Skip to content

Latest commit

 

History

History
228 lines (207 loc) · 27.2 KB

OLD_README.md

File metadata and controls

228 lines (207 loc) · 27.2 KB

dotvim

My dotvim - work in progress - Beta stages

Making my VIM to be close to an IDE setup for the following languages:

  • Ruby
  • Go
  • HTML
  • CSS
  • Javascript (React/JSX, Vue, es6, es7, babel)
  • XML
  • Rust
  • C
  • Python

Features

  • vimrc handling
  • Incremental and smart case search
  • Sublime like text editing of multiple cursors
  • Information regarding trailing whitespaces, including cleaning shortcuts
  • Logical and Visual layout (for Right-To-Left lanaguegs) editing
  • Tabs expanded to 2 spaces by default, except for Python
  • Keeping the <Leader> key as Backspace
  • Adding jj in edit mode to become alias to the <ESC> key
  • Highlight current row and color column 80
  • Syntax checking
  • Snippets
  • Completion Quotes, parenthesis pairs, etc
  • Extended pair matching with %
  • ASCII and table drawing
  • Fuzzy file, buffer, MRU, tag, etc finder
  • Task list
  • Git support
  • Tab Completion
  • Commenting
  • History management, including persistent undo
  • Additional documentation support
  • Reload file when changed from outside
  • Working with error window (a.k.a. quickfix)

Installation

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

git clone https://github.com/ik5/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

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

Plugins

Name Description
molokai The monokai theme for VIM
badwolf Inspired by Doctor Who Rose Tailor theme :)
vim-polyglot Over 70 language pack support for vim
Syntastic Syntax checking for many programming languages.
vim-fugitive Git support from insdie vim
gitv See git changes visually from inside vim
vim-gitgutter Indicate what was changed based on latest git status at the gutter level
nerdcommenter Commenting based on syntax
vim-multiple-cursors Multiple cursors like with Sublime
vim-dispatch Execute things in async
mw-utils Test functions for other plugins
tlib-vim Dependencies for tlib
nerdtree File explorer that is not Sexplore
ctrlp Fuzzy file, buffer, mru, tag etc finder
bufexplorer Buffer management plugin
ruby Ruby support for vim
vim-rails Rails support for vim
vim-bundler Bundler support for vim
vim-endwise wisely add "end" in ruby, endfunction/endif/more in vim script, etc
vim-test Execute tests of many languages
vim-ruby-sinatra Support for Sinatra
vim-go Golang support for vim
go-explorer Explore go code and GoDoc
vim-unimpaired pairs of handy bracket mappings
auto-pairs Auto generate pairs for '"{[(
matchit.zip Provide ability to configure % to match more then just single characters
vim-airline lean & mean status/tabline for vim that's light as air
vim-airline-themes A collection of themes for vim-airline
powerline fonts Patched fonts for Powerline users
supertab Complete using the TAB key
tagbar Using ctags to show tags of a project My dotfiles
ultisnips The ultimate snippet solution for Vim
vim-snippets vim-snipmate default snippets
vim-snipmate nipMate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim
vim-plugin-viewdoc Vim plugin: flexible viewer for any documentation
rust.vim Rust support for vim
vim-racer Rust racer Syntax checking
undotree Visual undo graph
vim-surround surrond changing things based on syntax, such as ', ", [, ] etc..
vim-repeat Enable repeating supported plugin maps with '.'
webapi-vim Web API for other plugins
vim-mucomplete Auto complete library
xml.vim Helps editing XML and (x)html
splitjoin A vim plugin that simplifies the transition between multiline and single-line code
drawit ASCII drawing plugin: lines, ellipses, arrows, fills and more!
tasklist.vim An aggregated list for TODO, FIXME and XXX
tabular Vim script for text filtering and alignment
vim-table-mode Drawing table using vim
tern for vim Using turn to do anaylze code connected to analyze javascript
vim-eunuch eunuch.vim: helpers for UNIX
vim-bracketed-paste Handles bracketed-paste-mode in vim (aka automatic :set paste)
quick-scope Lightning fast left-right movement in Vim
emmet-vim emmet-vim is a vim plug-in which provides support for expanding abbreviations similar to emmet.
vim-css-color Coloring the CSS color text
clang_complete Use clang for completing C, C++ etc..
vim-vue Syntax Highligth for Vue.js components
python-mode Vim python-mode. PyLint, Rope, Pydoc, breakpoints from box.
vim-jsx React JSX syntax highlighting and indenting for vim
[javascript-libraries-syntax](https://github.com/Syntax for JavaScript libraries) Syntax for JavaScript libraries
ES.Next This syntax file is for ES7 and future syntax
vim-javascript-syntax Enhanced javascript syntax file for Vim
vim-json A better JSON for Vim: distinct highlighting of keywords vs values, JSON-specific (non-JS) warnings, quote concealing. Pathogen-friendly.
jsdoc-syntax Standalone JSDoc syntax for vim
vim-babel Wrapper around babel.js (ES2015, React, ...)
vim-javascript Vastly improved Javascript indentation and syntax support in Vim.
vim-jsx-pretty React JSX syntax pretty highlighting for vim
babel-vim-snippets Next generation JavaScript and React snippets for Vim
berkeleys-snippet-emporium vim snippets for react.
jedi-vim Using the jedi autocompletion library for VIM for Python
vimproc Interactive command execution in Vim.

Shortcuts

Key Description
<leader> The leader key is set to \
jj The keys are set to be a fast escape key
<leader>r Reload vimrc
<leader>R Reload and activate vimrc changes
<leader>w Fast saving (:w!)
:W Do a sudo to try and save the file, as a command!
Ctrl+j Go to the window bellow
Ctrl+k Go to the window above
Ctrl+h Go to the window on the left
Ctrl+l Go to the window on the right
Ctrl+w In insert mode, allows the window moving to work the same
- and + Resize horizontal window
Alt+, and Alt+. Resize vertical window
F2 Close current window (do not remove the buffer)
<leader>d Delete current buffer
<leader>D Delete current buffer, keep split and switch to another buffer if found
<leader>S Clean all of annoying white spaces in the end of a line
F5 Toggle highlight search
Ctrl+F9 Execute async compiler
F3 Toggle NerdTree
Alt+j Move current line down
Alt+k Move current line up
Shift+F7 Toggle spell checking
<leader>sn Move to the next misspelled word
<leader>sp Move to the previous misspelled word
<leader>sa Add current word under the cursor to the dictionary
<leader>s? Show suggestion window
<leader>fc Find git merge conflict markers
<leader>g? Show git status
<leader>gb Show git blame
<leader>gc Do git commit
<leader>gvd Show vertical git diff
<leader>g/ Do git grep
<leader>gp Do git push
<leader>gv See git in history changes (log) in new tab
<leader>gV See git in history changes (log) in new windows
<leader>gD See current git diff in a new window
]h Go to the next group of changes in the current file from last commit
[h Go to the previous group of changed in the current file from last commit
<leader>hs Stage the current chunk of changes
<leader>hu Undo last stage of changes
<leader>hv Preview current stage of changes
<leader>f0 up to <leader>f0 Set code folding levels
Ctrl+p Toggle paste
<leader>m Remove the annoying Windows EOF of ^M
<leader><leader> Switch between the last two files
<leader>y Copy the current line/visual selection to ~/tmp/.vbuf file
<leader>p Paste the content from ~/tmp/.vbuf file
Y Yank the current line (to be consistent with D and C)
<leader>ff Display all of the lines with a keyword under the cursor and ask where to go at the list
<leader>e Display the next error from the quickfix window
<leader>E Display the previous error from the quickfix window
<leader>Ctrl+e Close quickfix window
<leader>q Close all open windows except of the current one
Ctrl+f Print the full path we are at
<leader>Ctrl+w Exit diff mode
F8 Toggle Reverse insertion - For visual order editing
F9 Toggle direction mapping - for logical order editing
F11 Show BufExplorer
Shift+F11 Toggle BufExplorer
Alt+F11 Show BufExplorer in a Horizontal window
Ctrl+F11 Show BufExplorer in a Vertical window
<leader>hc Toggle view of hidden chars
<leader>wrp Toggle word wrap
<leader>srt Sort numbers in paragraph based on the external sort command
Shift+Tab Execute :retab, to fix mixed spaces/tabs rules