Vim
A complicated yet extremely powerful and efficient modal Text editor.
I’m currently using Neovim, which is a hard-fork of the original vim project for implementing aggressive code refactoring, reasonable defaults, and other new functionalities like Language Server Protocol.
Topics
Books
Documentations
Cheat sheet
General
- http://vim.wikia.com/wiki/Vim_documentation
- vim cookbook
- http://www.rayninfo.co.uk/vimtips.html
- http://vimcasts.org/ - Vim screen cast by Drew Neil
- http://vimeo.com/user1690209 - vim screen casts by Derek Wyatt.
- http://www.openvim.com/
- http://vim.runpaint.org/toc/ - Vim recipes
- http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html
- https://engineering.purdue.edu/ECN/Support/KB/Docs/ViTextEditorTutorial
- http://wiki.kldp.org/wiki.php/ViEditorTips
- http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Vim
- Smylers:Power Vim Usage
- http://blog.danielfischer.com/2010/11/19/a-starting-guide-to-vim-from-textmate/
- http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/
- Learning Vim in 2014: Vim as Language
- Vim Text Objects: The Definitive Guide
- Vim’s Big Idea
Setup
General
- http://stevelosh.com/blog/2010/09/coming-home-to-vim/ - an extensive post about vim and its settings and plugins.
- http://tottinge.blogsome.com/use-vim-like-a-pro - A good tutorial + setup guide.
- http://nvie.com/posts/how-i-boosted-my-vim/ - a pretty good guide to setting up vim.
- http://mirnazim.org/writings/vim-plugins-i-use/
Colorschemes
Plugins
- http://vimawesome.com
- http://stevelosh.com/blog/2011/09/writing-vim-plugins
- vundle: vundle
- NERD tree: The NERD tree : A tree explorer plugin for navigating the filesystem - Essential!
- Ultisnip: https://github.com/SirVer/ultisnips
- Fugitive: http://github.com/tpope/vim-fugitive - a Git wrapper.
- Surround.vim: vim surround
- Airline
For Python
- http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/
- http://sontek.net/turning-vim-into-a-modern-python-ide
- http://unlogic.co.uk/posts/vim-python-ide.html
For writing
Tips
- Conceal
- Diff
- `:vert diffs xxx` opens xxx in the diff mode.
- `dg` (diff get) and `dp` (diff put) are the most basic commands.
- `diffthis` changes the mode of current buffer as the diff mode; `diffoff` turns off diffmode.
- http://vimdoc.sourceforge.net/htmldoc/diff.html
- Indentation
- http://vim.wikia.com/wiki/How_to_stop_auto_indenting
- help text-objects
- >>, \<\<, 6>> (indent 6 lines)
- use ‘.’ and ‘u’ to indent more or undo.
- ‘gv’ to select previous visual selection.
- >{motion}, \<{motion}
- {movement}. for instance G will indent towards the end.
- =i} will indent inside bracket.
- 한글 자판에서도 커맨드 입력을 가능하게
set noimd
set imi=1
set ims=-1
- movements
- Youtube: Vim Navigation Commands
- %: parenthesis
- H,M,L
- Change list and jump list: http://vimcasts.org/episodes/using-the-changelist-and-jumplist/
- g; : move to the previous position, g, : move forward through the changelist.
- Registers
- Vim registers: The basics and beyond
""
: default register"+
: clipboard register"=
: expression register"0-9
: last yanked":
: the most recent executed command- Pasting in the insert mode:
CTRL + r
then press the register id. Let Vim Do the Typing
- Search & replace
:g/^$/d
: http://stackoverflow.com/questions/706076/vim-delete-blank-lines (org/^\s*$/d
)
- Spell
- tabs
- gt, gT : move around.
- Thesaurus
- visual block mode
- c change selection (delete and switch to insert mode)
- I insert in front of cursor
- A append after cursor
- r replace every character in selection
- d delete selection
- o toggle cursor to opposite corner
- Wrap
- command! -nargs=* Wrap set wrap linebreak nolist
:%norm vipJ
Articles
- http://j.mearie.org/post/1466244802/adding-line-numbers-in-vim , http://j.mearie.org/post/1474860813/vim-vi-and-their-interfaces
- http://kevinw.github.com/2010/12/15/this-is-your-brain-on-vim/
- http://www.norfolkwinters.com/vim-creep
- Seven habits of effective text editing
- Why Atom Can’t Replace Vim
Fun
- Memes
- http://vimgolf.com/ - see also Code golf
- How to exit vim
Tutorials
Mastering the Vim Language
- https://www.youtube.com/watch?v=wlR5gYd6um0
- Vim: Tutorial on Editing, Navigation, and File Management - a good tutorial
(count) (operator) (text object / motion)
- “gUaW”: capitalize a word
- “d]m”: delete to start of next method