💡Vim
https://www.vim.org/
The Basics
Configuration
All configuration in .vimrc file
To change .vimrc you need update configuration by command : + so %
Visual mode
shift + v- visual line modeshift + vand get some line numbers, then:sort- will sort lines
Commands
d + d- deletey- copy linep- paste line.- repeat last commandyiw- copy the word/- search in file
vs- vertical splitsp- horizontal splitcntr + w + hjkl- move between split windowscntr + hjkl- move between split windows if you change .vimrc filecntr + w + w- move between split windows
zz- point window to cursor
!ls- list all files in work directory
e .- files in current directory^- switch between files: + tabedit + file.txt- edit file in new tab: + bd- delete current tab
bp- previous bufferls- list of buffersb3- go to the third bufferbd- delete current buffergt- switch beetween buffers
di(- remove, for examplearray $arrparameter in methoddi'- remove inside ', for example in 'some here th', will be ''ci'- change inside 'vi'- select inside 'vi(- select inside (va{- will select inside { with itselfvat- will select inside of current cursor
Digging Deeper
Useful links
Install plugin
Paste into
.vimrcname of plugin:Plugin 'tpope/vim-vinegar'Run
: + PluginInstall
Shortcuts
Every shortcut add in .vimrc
Plugins
Vundle
cntr + p- find filecntr + t- open tree in directory
Ctag
Snipmate
Surround plugin
Php plugin
Last updated