Differences between version 5 and predecessor to the previous major change of VimNotes.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 5 | Last edited on Tuesday, July 15, 2003 11:15:26 am | by DanielLawson | Revert |
Older page: | version 3 | Last edited on Monday, June 23, 2003 5:51:57 pm | by JohnMcPherson | Revert |
@@ -8,4 +8,34 @@
__Compiling__
To build from within vim, simply use ":make". It's probably a good idea to set your current working directory to the same place as your makefile is located, which you can do with ":chdir <directory>". Vim will build your project, and hopefully jump intelligently to the right place whenever you encounter errors. If you need to set environment variables for your build, it's probably a good idea to set them on your :make line, eg ":make x=n"
+
+__Buffer Movement__
+
+Vim will support multiple buffers. You can switch between them using the menu in gvim, or if you prefer to use commands you can use the following:
+ :bn # next buffer
+ :bp # previous buffer
+
+You can delete a buffer with
+ :bd
+or
+ :bd n # where n is the number of a buffer
+ :bd % # current buffer
+ :bd # # previous buffer
+
+I map these to keys to make them useful. My [.vimrc] has the following:
+ set autowrite
+ nmap <tab> :bn<cr>
+ nmap <s-tab> :bp<cr>
+ nmap <c-f4> :bn<CR>:bd #<CR>
+
+Set autowrite tells vim to save the file when you change buffers. Vim wants to do this, its a bit annoying.
+The above maps will map tab and shift tab to next and previous buffer, and ctrl-f4 to delete current buffer. ctrl-f4 will delete the current buffer in a way that will preserve any splits you have open, ie it'll move to the next buffer, then delete the previous one.
+
+--DanielLawson
+
+----
+
+There is a good vim reference guide [here|http://www.dc.turkuamk.fi/docs/soft/vim/vim.html]
+
+----