Differences between version 8 and predecessor to the previous major change of VimNotes.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 8 | Last edited on Wednesday, November 29, 2006 1:49:39 pm | by IanMcDonald | Revert |
Older page: | version 7 | Last edited on Wednesday, November 29, 2006 1:39:15 pm | by KurtGaastra | Revert |
@@ -15,9 +15,9 @@
</pre>
Note that the ^[ should be a literal escape character.
-Most vim colour schemes will need to be customised a little to look decent in this mode allthough
some such as xterm16 are designed for it.
+Most vim colour schemes will need to be customised a little to look decent in this mode although
some such as xterm16 are designed for it.
--KurtGaastra
!!Compiling
@@ -26,23 +26,31 @@
!!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:
+<pre>
:bn # next buffer
:bp # previous buffer
+</pre>
You can delete a buffer with
+<pre>
:bd
+</pre>
or
+<pre>
:bd n # where n is the number of a buffer
:bd % # current buffer
:bd # # previous buffer
+</pre>
I map these to keys to make them useful. My [.vimrc] has the following:
+<pre>
set autowrite
nmap <tab> :bn<cr>
nmap <s-tab> :bp<cr>
nmap <c-f4> :bn<CR>:bd #<CR>
+</pre>
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.
@@ -57,19 +65,23 @@
* __fileencodings__ is a list of encodings that vim will use when autodetecting files on load.
If you want to be modern, and only use utf-8 everywhere, put the following in your
$HOME/.vimrc file:
+<pre>
set encoding=utf-8
set termencoding=utf-8
set fileencoding=utf-8
+</pre>
If you might ever use vim to edit raw binary data, then it's a good idea to make
sure that vim doesn't try any conversation on file load:
+<pre>
" leave these as blank, so no conversation done?
set fileencoding=
set fileencodings=
+</pre>
----
There is a good vim reference guide [here|http://www.dc.turkuamk.fi/docs/soft/vim/vim.html]
----