sudo apt-get install vim-gnome OR (sudo apt install vim-gtk3)
git clone https://github.com/stadniklksndr/gvim.git ~/.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
ln -s ~/.vim/.vimrc ~/.vimrc
sudo apt install exuberant-ctags
sudo apt install fonts-powerline
sudo apt install wmctrl
BundleInstall
- run from Vim command line 🐾
-
- sudo npm install -g stylelint
- sudo npm install -g stylelint-config-standard
- Add
.stylelintrc.json
to root of your projectrequired
-
npm help
npm list --depth=0
~ version of an installed npm packagenpm list -g --depth=0
~ global version of an installed npm package
G
- take me to the bottom of the pagegg
- take me to the top of the pageU
- convert to uppercase (but firstly visually select text),u
to convert to lowercase{
,}
- skips block of code20j
- move cursor to position + 20 line10k
- move cursor to position - 10 line2}
- move cursor to position + 2 block2{
- move cursor to position - 2 blockdd
- delete line (also you can paste delited line usingp
)u
- undo delete.
- run last command againyy
- copy linep
- paste belowP
- paste aboveo
- add new line below and put you in insert mode (letter)O
- add new line above and put you in insert modew
- move to the next wordb
- move in reverse direction:20
- go to the specific line0
- takes you to the begin of current line (zero)^
- takes you to the bigin of code in current line$
- takes you to the end of the linet{any letter or sybol}
- take you to chosen letter in linef{letter || sybol}
- takes you to letter and highlight it in line%
- switches between{
,}
and so ond%
- delete everything in (), for example(this will be deleted)
cw
- reword word (set cursor at the begin of word)dw
- delete word (set cursor at the begin of word)D
- delete everything from tre right of cursorC
- delete everything from tre right and put you into insert modect{letter || symbol}
- delete everything up to chosen letter and put you into insert modedt{letter || symbol}
- delete everything up to chosen lettershift+*
- highlight current word everything in the filen
- switches between highlighted wordsa
- takes you in insert mode over the one letterA
- takes you into insert mode to the end of the lineI
- takes you into insert mode to start of the linex
- delete current letter~
- makes letter Up or Downr{letter}
- replaces letter<
,>
- moves highlighted code<<
,>>
- moves current lineput =expand('%:p')
- insert lines consisting of the full path (https://vi.stackexchange.com/questions/104/how-can-i-see-the-full-path-of-the-current-file):mksession! ~/.vim_session
- save all tabs before closing GVim:source ~/.vim_session
- restore session when reopening GVim
- Use m{a-zA-z} to set a mark point in your document
- Use '{a-zA-Z} to jump to a set mark point
- :!
- :!ls - example
- :!python % => % is current filename
:%s/foo/bar/g
- find each occurrence of 'foo' (in all lines), and replace it with 'bar':6,10s/foo/bar/g
- change each 'foo' to 'bar' for all lines from line 6 to line 10 inclusive.
-
-
manual or
:help syntastic-checkers
-
:SyntasticInfo
~ show you which checkers are enabled for current file -
Current settings:
ruby_checkers
~mri
, rubocop, rubocop auto-correct by<F5>
javascript_checkers
~ standard, automatic-formatter by<F3>
coffee_checkers
~ coffeelintcss_checkers
~ stylelintscss_checkers
~ stylelint
-
-
Status line at the bottom of each window
:h airline
~ airline-contents
-
Collection of themes for vim-airline
- available themes
:AirlineTheme simple
~ set the theme from gvimlet g:airline_theme='simple'
~ set in .vimrc
-
:Git branch
:Git checkout master
- more info
-
:help NERDTree.txt
~ nerdtree contents<F2>
~ open nerdtreeww
~ new tabctrl+w+q
~ close tabctrl + (pgup/pgdn)
~ change tabshift + i
~ toggle hidden filesNERDTreeHighlightFile
~ add/change nerdtree file highlighting from .vimrcm
~ nerdtree menu for add, move, delete, and copy file (call from tree window)- f.a.q.
-
-
Jump between hunks:
]c
~ jump to next hunk[c
~ jump to previous hunk
-
Turn line highlighting on and off (defaults to off):
:GitGutterLineHighlightsEnable
~ turn on:GitGutterLineHighlightsDisable
~ turn off
-
-
/
- search in current filectrl + f
~ global search
-
colorscheme nameofcolorscheme
~ change the colorscheme from.vimrc
:colorscheme molokai
~ inside vim- colors
Tomorrow-Night
~ current color
-
- insert mode
ctrl + s + =
~ <%= %>ctrl + s + -
~ <% -%>
- insert mode
-
gf
~ open file under cursor,:help rails-gf
~ details:AV
~ jump to an "alternate" file (test),:help rails-alternate-related
~ details:RV
~ jump to "related" file (migration):2,3Extract post
~ create a post partial from 2,3 lines:[range]Extract {helper}
~ create a {name} helper from [range] lines (default:current line):[range]Extract {concern}
~ create a {name} concern from [range] lines (default: current line):Preview [path]
~ open the given path for the current app in a browser:Rails console
~ call rails console:Generate controller Blog
~ generates a blog controller:Rails
~ run the current test, spec, or feature- manual OR
:help rails.txt
-
- :CoffeeWatch vert - OR -
<F4>
~ live preview compiling - :CoffeeRun ~ run coffee script snippets
- :CoffeeWatch vert - OR -
-
\\
~ toggle comments
-
:help taglist
~ more information
-
:CtrlP or :CtrlP [starting-directory]
~ invoke ctrlp in find file mode
-
Commands
ctrl+s
~ save filealt+down
~ move line downalt+up
~ move line upctrl+o
~ previous filectrl+i
~ back to last opened file
-
Brief help
PluginList
~ lists configured pluginsPluginInstall
~ installs plugins; Append!
to update or justPluginUpdate
PluginSearch
~ searches plugin; Append!
to refresh local cachePluginClean
~ confirms removal of unused plugins; Append!
to auto-approve removal:h PlaginName
~ more details about plugin