arvim icon indicating copy to clipboard operation
arvim copied to clipboard

Arvim, My Vim Configuration

ArVim

    ___        _    ___         
   /   |  ____| |  / (_)___ ___ 
  / /| | / ___/ | / / / __ `__ \
 / ___ |/ /   | |/ / / / / / / /
/_/  |_/_/    |___/_/_/ /_/ /_/ 
                                

ArVim (Arda's Vim) (formerly known as my-vim-configuration) is my Vim configuration which I've started to create from scratch on 2014.05.06.

This configuration is basically aimed for my needs.

Components

This configuration includes some packages:

  • Pathogen - pathogen.vim makes it super easy to install plugins and runtime files in their own private directories.
  • Vundle - Vundle is a powerful plugin manager for Vim.
  • NERDTree - A tree explorer plugin for vim.
  • Vim-Airline - lean & mean status/tabline for vim that's light as air.
  • Conque-shell - Conque is a Vim plugin which allows you to run interactive programs, such as bash on linux or powershell.exe on Windows, inside a Vim buffer. Original script: here.
  • indentLine - A vim plugin to display the indention levels with thin vertical lines.
  • Vim-multiple-cursors: True Sublime Text style multiple selections for Vim.
  • Syntastic - Syntax checking hacks for vim.
  • Neocomplcache - Ultimate auto-completion system for Vim.
  • ctrlp.vim - Fuzzy file, buffer, mru, tag, etc finder.
  • Tagbar - Vim plugin that displays tags in a window, ordered by scope.
  • vim-autoclose - Inserts matching bracket, paren, brace or quote. Original script: here.
  • Vim-blade: Vim syntax highlighting for Blade templates (Laravel 4).
  • Solarized Color Scheme - precision colorscheme for the vim text editor.
  • Tomorrow Night Color Scheme, a separate repository for original colorscheme repo.
  • xoria256 Color Scheme - Finely tuned soft gamma, 256 colors, dark background. Original script: here.

Screenshots

Very recent screenshot with full features

Using Tomorrow-Night theme: Preview0

Using xoria256 theme: Preview1

The rest is out of date, but you'll get the idea.

Using solarized theme: Preview2

Preview3

Preview4

Requirements

  • Python 2.3+ or 3.0+ (for ConqueShell)
  • ctags (for tagbar)
  • Vim 7.0+ (for *nix), 7.3+ (for Windows, GVim)

Installation

###On *nix:

  1. First, backup or remove your .vimrc file and .vim folder.
  2. Then make sure you've installed git, php, and ctags globally.
  3. And then, just run these commands on your terminal:
wget -q -O - https://rawgit.com/Ardakilic/arvim/master/install-linux-osx.sh | bash
cd
vim +PluginInstall +qall

###On Windows:

  1. First, backup or remove your _vimrc file and vimfiles folder.
  2. Download very latest version of this configuration from here.
  3. Extract the archive to a folder.
  4. Rename the .vimrc to something like vimrc.vim, and put it in the same folder as the file _vimrc, vim$version, and the folder vimfiles (the root folder of Windows Vim).
  5. Open the _vimrc (that comes with default installation), find this line:
    source $VIMRUNTIME/mswin.vim
    
  6. Add below:
    source $VIMRUNTIME/../vimrc.vim "or whatever you've renamed
    
  7. Copy/move everything inside .vim to vimfiles.
  8. Run Vim or GVim.
  9. Enjoy! :smile:

Note: If the airline's separators are messed (> and <), roll back to default ones by deleting or commenting out these lines with ":

if !exists('g:airline_powerline_fonts')
    " Use the default set of separators with a few customizations
    let g:airline_left_sep='›'  " Slightly fancier than '>'
    let g:airline_right_sep='‹' " Slightly fancier than '<'
endif

Switching Color Schemes

This configuration comes with two color schemes, xoria256 as 256 color terminal scheme (default), and solarized for rich color scheme.

  • To switch from xoria256 to solarized, because solarized uses rich colors, first you'll need to change colors of your terminal to see the colors correctly. Here are the instructions to set the Ubuntu Terminal, official download also includes OSX or other terminal palettes.

  • Comment out these lines in .vimrc using ":

    set t_Co=256 "vim'e 256 renk terminaldeymiş gibi çalış de
    colorscheme xoria256
    
  • Uncomment these lines:

    syntax enable
    set background=dark
    colorscheme solarized
    
    let g:airline_theme='solarized'
    

To change from solarized from xoria256, do the opposite.

Note: If you want to use light palette of solarized instead of dark one, change set background=dark to set background=light.

Updating Plugins

It's quite easy. Make sure git is installed, then just run the update-plugins.sh that comes within the repository. Make it executable, and run it. (Code taken from here):

chmod +x update-plugins.sh
./update-plugins.sh

Another way is to download the whole package again, but you may have to re-edit your configuration if required.

Some Tricks

  • This configuration supports mouse input :)
  • (enabled default feature) Full UTF-8 support.
  • CTRL+e will toggle NERDTree.
  • (default feature) Pressing r will reload contents on focused folder in NERDTree (you'll see changes if done), R will reload all contents from root of NERDTree.
  • (default feature from plugin, remapped) Ctrl+d will select the next word (as in Sublime Text), and there will be multiple cursors. After then you can multi edit/delete the matched words. More info: here.
  • :T will split the current buffer, and open a new bash there. :Tn will open a new shell in the current buffer. (Note: To use powershell.exe etc. in Windows, you have to switch these lines: :cabbrev T ConqueTermSplit bash and :cabbrev Tn ConqueTerm bash)
  • F5 will toggle line numbers on active buffer. F6 will enable, F7 will disable it.
  • F2 will toggle the paste mode.
  • Ctrl+a selects everything in document (select all).
  • You an use Ctrl+X, Ctrl+C, Ctrl+V, Shift+Delete and Shift+Insert, which will work across Vim and the OS, and it won't affect blockwise selection. While in insert mode, to paste, use Ctrl + R + + instead.
  • You can use Shift + arrowkeys to make selection.
  • Default Ctrl+V is remapped into Ctrl+Q.
  • F8 will toggle the Tagbar.
  • j and k will really go to bottom and top line in editor, not the real next / previous line (if long lines are wrapped, it'd go to next #linenumber ignoring the wrap between).
  • jj will do what ESC does.
  • CTRL+n will open a new tab, CTRL + ← will switch to previous tab, CTRL + → will switch to next tab.
  • CTRL+Shift+d will duplicate the current line (just like Sublime Text).
  • (default feature) To open a file in a new tab from NERDTree, choose the file, and press t
  • If using mouse, F12 will switch mouse focus from Vim to Terminal, pressing F12 will switch again. (Using this snippet)
  • F3 and F4 will switch on current frames.
  • (default feature) CTRL+W+W will change the focus.
  • (default feature) CTRL+P will open the ctrlp.vim menu, which you're already similar to if you've used Sublime Text.
  • The cursor auto-wraps. This means, if you are at a start of a line and press , the cursor will go to the end of previous line, also the opposite is available. If you press at the end of the line, it will go to the first character of next line.
  • You can use TAB and SHIFT+TAB on editor both on insert mode and and while focused.
  • 3xLeft Click will fold/unfold the code block.
  • Pressing TAB will select the closest auto-complete word.
  • After searching, pressing CTRL+O will remove the highlight.
  • This configuration can highlight Laravel's Blade Template Engine syntax.

TODO

I'm open to suggestions, if you have a suggestion, please feel free to add them from issues page.

  • Ctrl+Shift+Arrowkeys feature.
  • On my Gnome Terminal, sometimes Airline + Solarized colors are messed even after I've set the colors (should be fixed).
  • Git Integration
  • Snippets
  • Tests on MacVim
  • ?

License

Free Software, Hell Yeah!