topunix / vimrc

:japanese_castle: vim setup to expedite your workflow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cat ~/.vimrc

This project is personal

My vim8 setup to expedite my workflow. Planning on moving to SpaceVim as my IDE after I explore a few more plugins.

Manually install

git clone git@github.com:topunix/vimrc.git

ln -s topunix/.vimrc ~/.vimrc

… then run the following in Vim:

:source %
:PlugInstall

Updates

  • init or add new plugin

     :PlugInstall
    
  • update

     :PlugUpdate
    
  • update vim-plug itself

    :PlugUpgrade
    

Plugins

Name Description
vim-plug Minimalist plugin manager with super-fast parallel installation
Nerd Tree Tree explorer plugin for navigating the filesystem
vim-signify Plugin for showing version control diffs in the sign column
delimitMate Plugin to insert or delete brackets, parens, quotes in pair
hiPairs Highlights the pair surrounding the current cursor position
vim-peekaboo See the contents of the registers
vim-better-whitespace Better whitespace highlighting for Vim
indentLine Plugin to display the indention levels with thin vertical lines
ALE Check syntax in Vim asynchronously and fix files
vim-fugitive A Git wrapper so awesome, it should be illegal
agit.vim A powerful Git log viewer
vim-gist Plugin for Gist
colorizer Color hex codes and color names
undofile_warn Warn when using the undofile
vim-illuminate Highlights other uses of the word under the cursor
vim-signature Plugin to toggle, display and navigate marks
vim-bracketed-paste Transparent pasting (no more :set paste!)
vim-polygot A solid language pack for Vim

Color schemes

Name Description
dracula-vim A dark theme for Vim (displayed below)
candid-vim A dark colorscheme with vibrant colors
plastic-vim VSCode Plastic theme port for vim/neovim

screenshot

Mappings/Shortcuts

I try to keep things as simple as possible, so I can focus more on coding problems. Too many mappings and plugins are hard for me to remember. I don't claim that my setup is a brilliant example of vim usage. It just reflects how I use vim.

  • I've set my leader to the comma.
Command Description
,ev vsplit $MYVIMRC (vimrc is auto reloaded)
,ss toggle/untoggle spell checking
z= to get suggestions -- during spell check
]s to get next misspelled word
[s to get previous one
  • Nerd Tree:

    Toggle NERDTree view: map <F3> :NERDTreeToggle<CR>

    Useful commands:
    :Bookmark [name] - bookmark any directory as name
    :NERDTree [name] - open the bookmark [name] in Nerd Tree

    Nerd Tree manual

  • vim-fugitive cheatsheet

  • git workflow

  • ALE

    Useful commands:
    :ALEFix - auto-fix code in your current file
    :ALEFix <fixer> - auto-fix code using a specific tool. :ALEFix eslint runs eslint --fix
    :ALEFixSuggest - suggest supported tools for fixing code

  • vim-gist

    Useful commands:
    :'<,'>Gist - Post selected text to gist, using default privacy option, from visual mode.
    :'<,'>Gist! - Creates new post of selected text to gist, using default privacy option. The bang(!) creates new entry.

  • Random color scheme:

    Switch scheme: map <F1> :call RandomColorScheme()<CR>
    Save scheme (updates .vimrc): map <F2> :call UpdateColor()<CR>

Contact

Enjoy it, and if you have any question or comment, feel free to contact me. Happy Coding :)

About

:japanese_castle: vim setup to expedite your workflow


Languages

Language:Vim Script 100.0%