Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " Vim global plugin for saving and loading a view to a file with the name
- " ."filename".view
- " Last change: 2009 Apr 15
- " Maintainer: Erik Helin <erik.helin@gmail.com>
- " License: This file is placed in the public domain
- if exists("loaded_mkviewfile")
- finish
- endif
- function s:SaveFile()
- let com = "mkview! .".buffer_name("%").".view"
- exe com
- endfunction
- function s:LoadFile()
- if file_readable(".".buffer_name("%").".view")
- let com = "source .".buffer_name("%").".view"
- exe com
- syntax enable
- endif
- endfunction
- if !exists(":Mkviewfile")
- command Mkviewfile call s:SaveFile()
- endif
- if !exists(":Loviewfile")
- command Loviewfile call s:LoadFile()
- endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement