Vi: Difference between revisions
Jump to navigation
Jump to search
(Inverting K (now up) and L (now down)) |
m (→Links) |
||
Line 5: | Line 5: | ||
** Official '''vim''' [http://www.vim.org/ homepage]. |
** Official '''vim''' [http://www.vim.org/ homepage]. |
||
* Fun |
* Fun |
||
** Vi would not be vi without a bit of fun... |
** Vi would not be vi without a bit of [http://www.dina.kvl.dk/~abraham/religion/index.html fun]... |
||
** Very funny material related to emacs vs. vi [http://www.dina.kvl.dk/~abraham/religion/index.html]. |
|||
* Guides & Cheat sheets |
* Guides & Cheat sheets |
||
** Very good post explaining why vi is superior and defeating common misconception (with examples) [http://www.viemu.com/a-why-vi-vim.html]. |
** Very good post explaining why vi is superior and defeating common misconception (with examples) [http://www.viemu.com/a-why-vi-vim.html]. |
Revision as of 20:56, 9 September 2008
Links
- General
- My links on vi on del.icio.us.
- Official vim homepage.
- Fun
- Vi would not be vi without a bit of fun...
- Guides & Cheat sheets
- Very good post explaining why vi is superior and defeating common misconception (with examples) [1].
- Very good graphical cheatsheet
- Direct links: overview and per-lesson.
Keyboard Shortcuts
! If keys HJKLM have been remapped to MHKJL, shortcut below must be changed accordingly !
Shortcut | Description | Custom |
---|---|---|
Ctrl+[ | Same effect as Esc, but a bit faster/easier to type. Also works on AZERTY keyboard (but apparently not for AndLinux, snif!) | |
* | Search next occurence of word under cursor (Here more like this...) | |
# | Search previous occurence of word under cursor | |
gd | Search first occurence of current search |
Some Stuff to Add in ~/vimrc file
(remarks: command in ~/vimrc file must not be prefixed with a colon :)
- To enable syntax highlighting + numbering:
syntax enable set bg=light " Use set bg=dark if console background color is dark set number
- To remap movement key bindings to JKLM (instead of HJKL, so that they are right under right hand fingers on AZERTY keyboards) and inverting K and L (so that up arrow is under major finger as on a normal arrow pad). Commands on key 'M' are now on key 'H'.
nnoremap j h nnoremap l j "nnoremap k k nnoremap m l nnoremap h m vnoremap j h vnoremap l j "vnoremap k k vnoremap m l vnoremap h m