Skip to content

MeirKriheli/dotvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My vim setup

My vim IDE setup for Python, Go, Rust, html, css, javascript, typescript, gettext and more.

Features

  • vimrc handling
  • Incremental and smart case search.
  • Sublime Text style multiple selections
  • Trailing whitespace highlightling and cleaning shortcut
  • Logical and Visual layout (for Right-To-Left lanaguegs) editing.
  • Tabs expand to 4 spaces by default
  • Remap `<Leader> to <SPACE> and jj` to ``<ESC>
  • Highlight current row and color column 80
  • 70+ language packs support
  • Syntax checking
  • Snippets
  • Quotes, parens etc pair, surround
  • Extended pair matching with %
  • ASCII drawing
  • Fuzzy file, buffer, mru, tag, etc finder
  • Task list
  • VCS plugins (Fugitive, Lawrencium)
  • Tab completion
  • Commenting

Prerequisites

Vim with Python support.

Usage

The following commands will clone the repo, symlink ~/.vimrc and update the bundles:

git clone https://github.com/MeirKriheli/dotvim.git ~/.vim
ln -s ~/.vim/vimrc ~/.vimrc
cd ~/.vim
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Install plugins from the command line:

vim +PlugUpdate +qa

To add or override settings, place them in ~/.vim/vimrc.local.

To update submodules in the future, when you have vim running, source vimrc to make sure plugins list is updated (or restart vim):

:PlugUpdate

completor.vim

For setting up completor.vim per specific supported language, please see: https://github.com/maralla/completor.vim#completers

Upgrading

In case you're updating from previous Vundle based to vim-plug, remove the bundle directory as it's not needed anymore, get vim-plug and install the plugins:

cd ~/.vim
rm -rf bundle
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugUpdate +qa

Go tags

For CtrlPBufTag search in go lang files, make sure you have an updated version of ctags (>=5.8) and put in your ~/.ctags:

--langdef=Go
--langmap=Go:.go
--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/f,func/
--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/v,var/
--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/t,type/

Overrides

  • ~/.vim/vimrc.before, if exists, is sourced before everything allowing definitions of variables to act upon.
  • ~/.vim/vimrc.local, or ~/.vim/vimrc.after if exists, is sourced after all the files in ~/.vim/vimrc.d allowing override of default settings (e.g: color schemes, plugin configuration, etc.).

Plugins

  • Solarized - color scheme
  • base16-vim - color scheme
  • vim-molokai - color scheme
  • vim-distpach - asynchronous build and test dispatcher
  • Fugitive - a Git wrapper so awesome, it should be illegal
  • Lawrencium - Mercurial wrapper for Vim, inspired by Tim Pope's Fugitive
  • ctrlp.vim - Fuzzy file, buffer, mru, tag, etc finder
  • SuperTab - Insert mode completions with Tab
  • completor.vim - Async completion framework made ease
  • Syntastic - Syntax checking hacks for vim (for vim < 8)
  • ale - Asynchronous Lint Engine (for vim >= 8)
  • UltiSnips - The ultimate snippet solution for Vim.
  • vim-snippets - vim-snipmate default snippets
  • python-mode - Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box
  • vim-go - Go development plugin for Vim
  • rust.vim - provides Rust file detection, syntax highlighting, formatting, Syntastic integration, and more.
  • DrawIt - Ascii drawing plugin: lines, ellipses, arrows, fills, and more!
  • vim-surround - quoting/parenthesizing made simple
  • Shebang - Make executable by setting the correct shebang and executable bit
  • Tagbar - Displays tags in a window, ordered by class etc
  • NERD tree - A tree explorer
  • auto-pairs - Insert or delete brackets, parens, quotes in pair
  • po.vim - Easier editing of GNU gettext PO files
  • TaskList - Eclipse like task list
  • MatchIt - Extended % matching for HTML, LaTeX, and many other languages
  • MatchTag - Highlight matching HTML tags
  • vim-airline - Light weight statusline utility
  • tabular - text filtering and alignment
  • vim-plugin-viewdoc - Flexible viewer for any documentation
  • tcomment_vim - An extensible & universal comment vim-plugin that also handles embedded filetypesludovicchabant/vim-lawrencium
  • vim-unimpaired - pairs of handy bracket mappings
  • vim-multiple-cursors - True Sublime Text style multiple selections for Vim
  • splitjoin.vim - A vim plugin that simplifies the transition between multiline and single-line code
  • vim-repeat - enable repeating supported plugin maps with "."
  • tsuquyomi - A Vim plugin for TypeScript
  • vim-highlightedyank - Make the yanked region apparent!

Shortcuts and re-Mappings

Key Command
jj <Esc> in insert and command modes
<SPACE> <Leader>
<Leader>v Load .vimrc
<Leader>V Activate changes to .vimrc (Make sure to save it before)
<F2> Close current split (window)
<F3> Toggle NERD tree
<F4> Toggle search highlight
<F5> Toggle Tagbar
<Leader>S Remove trailing whitespace
<CTRL>hjkl Window movement commands
<CTRL>arrow Window movement commands
<Leader>d Delete buffer, keep the split
-, + Resize horizontal splits
<ALT>< <ALT>> Resize vertical splits
<F9> Toggle logical (RTL, e.g: Hebrew) editing
<F8> Toggle visual (RTL, e.g: Hebrew) editing
g/ :grep!<Space>
g* :grep! -w current_word
ga :grepadd! (add results to the current search)
gr :CtrlPBufTag (fuzzy tag search in current file)

About

My vim as IDE setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published