CSx
Github Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

💻 Vim


Cut/Copy Paste Registers not working

  • vim ~/.vimrc

    -- set clipboard+=unnamed
    ++ set clipboard=unnamed
    

Spellcheck

  • vim ~/.vimrc

    ++ set spell spelllang=en_us
    
  • Movement

    • ] + s = Next misspelled word

    • [ + s = Prev misspelled word

  • Suggestions

    • z + =
  • Add to dictionary

    • z + g
  • Mark for later

    • z + w
  • turn off with :set nospell

    Or edit ~/.vimrc and add :map <F7> :setlocal spell! spelllang=en_us<CR> to toggle with F7

Vundle Installation

  • git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

  • If cp ~/.vim then load vim and run: :PluginUpdate

    If you copied ~/.vim from another system just run the above command to update plugins

  • vim ~/.vimrc

    set nocompatible                  "Switch off later if needed
    filetype off                      "^same
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    Plugin 'VundleVim/Vundle.vim'
    Plugin 'ctrlpvim/ctrlp.vim'
    Plugin 'preservim/nerdtree'
    Plugin 'Yggdroot/indentline'
    Plugin 'vim-syntastic/syntastic'
    Plugin 'vim-airline/vim-airline'
    Plugin 'lervag/vimtex'
    Plugin 'xuhdev/SingleCompile'
    Plugin 'godlygeek/tabular'
    Plugin 'henrik/vim-indexed-search'
    Plugin 'vim-airline/vim-airline-themes'
    Plugin 'rafi/awesome-vim-colorschemes'
    call vundle#end()
    filetype plugin indent on
    " Brief help
    " :PluginList       - lists configured plugins
    " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
    " :PluginSearch foo - searches for foo; append `!` to refresh local cache
    " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
    "
    " see :h vundle for more details or wiki for FAQ
    " Put your non-Plugin stuff after this line
    

    See below for plugin links

View or edit encrypted documents with Vim

Turn off auto backup

  • vim ~/.vimrc

    ++ set nobackup
    ++ set nowritebackup
    

Change Color scheme

  • vim ~/.vimrc

    ++ colorscheme challenger_deep
    

    See below for themes

Vim Airline plugin fonts fix

  • git clone https://github.com/powerline/fonts.git

  • cd fonts

  • ./install.sh

Fonts not rendering

Update font cache–not effective with KDE Neon/Hack TTF?

  • mkdir ~/.local/share/fonts && cd ~/.local/share/fonts

  • wget https://github.com/source-foundry/Hack/releases/download/v3.003/Hack-v3.003-ttf.zip

  • p7zip hack*

  • fc-cache -f -v

Add line numbers to the beginning of each line

  • :%s/^/\=line('.')/

Resources

Resources (Vim Plugins / Colorschemes)