Vim Notes

Post tags: | vim |

current vim training

surround.vim

emmet.vim

sparkup

tricks

use register 0 to paste the same yank multiple times

use register 0 to p multiple times
        buffer 0 holds the last yank
        
        make a visual selection
        y
        make another visual selection
        "0p
        pastes the selection from buffer 0
        

vundle plugins

vundle at github

Installing plugins
        git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
        
        Launch vim and run :PluginInstall
        
        To install from command line: vim +PluginInstall +qall
        

List vundle plugins

vundle plugins
        Plugin 'altercation/vim-colors-solarized'
        Plugin 'duff/vim-scratch'
        Plugin 'mattn/emmet-vim'
        Plugin 'tpope/vim-markdown'
        Plugin 'tpope/vim-surround'
        Plugin 'tpope/vim-haml'
        Plugin 'kana/vim-textobj-user'
        Plugin 'nelstrom/vim-textobj-rubyblock'
        Plugin 'Lokaltog/vim-easymotion'
        Plugin 'thisivan/vim-bufexplorer'
        Plugin 'scrooloose/nerdtree'
        Plugin 'jelera/vim-javascript-syntax'
        Plugin 'vim-scripts/JavaScript-Indent'
        Plugin 'bitfyre/vim-indent-html'
        

Plugin ‘tpope/vim-surround’

:help registers

:help mark

:help motion

:help motion.txt

Research

Using plugins

Consider plugins

  • kien/ctrlp.vim
  • emmet-vim
  • rstacruz/sparkup
  • Bundle ‘scrooloose/nerdcommenter’
  • Bundle ‘Shougo/neocomplete.vim’
  • Bundle ‘othree/html5.vim’
  • https://github.com/SirVer/ultisnips
  • https://github.com/powerline/powerline
  • Bundle ‘godlygeek/csapprox’
  • https://github.com/bling/vim-airline
  • Bundle ‘scrooloose/syntastic’
  • https://github.com/leshill/vim-json
  • Bundle ‘vim-scripts/vim-json-bundle’
  • tpope/vim-sensible
  • tpope/vim-unimpaired
  • https://github.com/vim-scripts/YankRing.vim
  • https://github.com/vim-scripts/FuzzyFinder

Indent code

        press v for visual mode.
        use up/down arrow to highlight text.
        press = to indent all the lines you highlighted.