Vim: Difference between revisions

From DWIKI
No edit summary
Line 1: Line 1:
== links ==
= links =
* [http://www.vim.org/ http://www.vim.org/] - vim homepage
* [http://www.vim.org/ http://www.vim.org/] - vim homepage
* [http://vimdoc.sourceforge.net/ http://vimdoc.sourceforge.net/] - the online source for Vim documentation
* [http://vimdoc.sourceforge.net/ http://vimdoc.sourceforge.net/] - the online source for Vim documentation


== FAQ ==
=Documentation=
==Editing xml files==
===Create tag pairs===
 
 
= FAQ =
Commands are entered by hitting the Esc button then ":" and the setting, function, command etc.
Commands are entered by hitting the Esc button then ":" and the setting, function, command etc.


===Indentation===
==Indentation==


  :set filetype=xml
  :set filetype=xml
Line 13: Line 18:
*http://www.chovy.com/web-development/fix-indentation-and-tabs-in-vim/
*http://www.chovy.com/web-development/fix-indentation-and-tabs-in-vim/


===Enable/Disable line numbering===
==Enable/Disable line numbering==


   set nu!
   set nu!


===Importing the output of '''ls -l''' into the current buffer===
==Importing the output of '''ls -l''' into the current buffer==


   r !ls -l
   r !ls -l


===syntax highlighting on dark background===
==syntax highlighting on dark background==
  :set background=dark
  :set background=dark


===Sort lines 50 to 76 ussing the unix '''sort''' command===
==Sort lines 50 to 76 ussing the unix '''sort''' command==


   50,76 !sort
   50,76 !sort


===Change syntax colours===
==Change syntax colours==
  find syncolor.vim
  find syncolor.vim


*http://nosheep.net/story/vi-color-schemes/
*http://nosheep.net/story/vi-color-schemes/


===End highlighting search results===
==End highlighting search results==
  <f9> <esc>:nohlsearch<cr>
  <f9> <esc>:nohlsearch<cr>


===show tabs===
==show tabs==
  :set list
  :set list

Revision as of 12:07, 24 February 2009

links

Documentation

Editing xml files

Create tag pairs

FAQ

Commands are entered by hitting the Esc button then ":" and the setting, function, command etc.

Indentation

:set filetype=xml

Enable/Disable line numbering

 set nu!

Importing the output of ls -l into the current buffer

 r !ls -l

syntax highlighting on dark background

:set background=dark

Sort lines 50 to 76 ussing the unix sort command

 50,76 !sort

Change syntax colours

find syncolor.vim

End highlighting search results

<f9> <esc>:nohlsearch<cr>

show tabs

:set list