Penguin

Differences between version 7 and predecessor to the previous major change of VimNotes.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 7 Last edited on Wednesday, November 29, 2006 1:39:15 pm by KurtGaastra Revert
Older page: version 6 Last edited on Friday, October 29, 2004 1:22:33 pm by JohnMcPherson Revert
@@ -4,8 +4,22 @@
  
 !!Syntax Highlighting 
  
 vim, of course, supports syntax highlighting. Often this isn't on by default. The easiest way to turn this on is to type ":syntax on". Viola. What's that? You're using a dark background and the highlighting looks terrible? No real problem. Try ":set background=dark". Adjust as appropriate for 'it looks horrible and I have a white background'. If you just think it looks horrible fullstop, you can get a new syntax highlighting file for it... download one from vim.org, throw it into your ~/.vim/colors directory (you may have to create this) and explore the colorscheme command (hint, ":help colorscheme" or just ":colorscheme x", where your scheme file is x.vim). I recommend borland.vim, the colorscheme for the borland "Turbo" IDEs. 
+  
+If you run vim in the terminal your colour schemes are by default limited to 16 colours. Some terminals such as xterm can be compiled with 256 color support. To enable vim to use these add the following lines to your .vimrc:  
+<pre>  
+" Enable 256 colors  
+set t_Co=256  
+set t_AB=^[[48;5;%dm  
+set t_AF=^[[38;5;%dm  
+  
+</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.  
+  
+--KurtGaastra  
  
 !!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"