Last active
August 29, 2015 13:57
-
-
Save dunckr/9414858 to your computer and use it in GitHub Desktop.
Win VIM in conjunction with http://vim.spf13.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " color scheme | |
| syntax enable | |
| "set background=dark | |
| colorscheme solarized | |
| let g:solarized_underline=0 | |
| " line numbers | |
| set relativenumber | |
| " search | |
| set smartcase | |
| set ignorecase | |
| " test | |
| set t_Co=256 | |
| " keybinds | |
| " no cheats | |
| nnoremap <Left> :echoe "Use h"<CR> | |
| nnoremap <Right> :echoe "Use l"<CR> | |
| nnoremap <Up> :echoe "Use k"<CR> | |
| nnoremap <Down> :echoe "Use j"<CR> | |
| " mirror sublime shortcuts | |
| map <C-k><C-b> :NERDTreeToggle<CR>:NERDTreeMirror<CR> | |
| " noob commands | |
| nnoremap <C-t> :tabnew<CR> | |
| nnoremap <C-1> 1gt | |
| nnoremap <C-2> 2gt | |
| nnoremap <C-3> 3gt | |
| nnoremap <C-4> 4gt | |
| nnoremap <C-5> 5gt | |
| nnoremap <A-2> :vsplit<CR> | |
| nnoremap <A-3> :split<CR> | |
| noremap H :call WrapRelativeMotion("^")<CR> | |
| noremap L :call WrapRelativeMotion("$")<CR> | |
| " switch syntax highlighting on, when the terminal has colors | |
| syntax on | |
| " use vim, not vi api | |
| set nocompatible | |
| " no backup files | |
| set nobackup | |
| " no write backup | |
| set nowritebackup | |
| " no swap file | |
| set noswapfile | |
| " command history | |
| set history=100 | |
| " always show cursor | |
| set ruler | |
| " show incomplete commands | |
| set showcmd | |
| " incremental searching | |
| set incsearch | |
| " highlight search | |
| set hlsearch | |
| " clear search buffer | |
| :nnoremap § :nohlsearch<cr> | |
| " make sure undo history is kept for files in buffer. | |
| set hidden | |
| " turn indentation on | |
| filetype indent on | |
| " enable filetype plugins | |
| filetype plugin on | |
| " disable folding because it is evil | |
| set nofoldenable | |
| " scroll with more context | |
| set scrolloff=10 | |
| " allow backspace to delete end of line, indent and start of line characters | |
| set backspace=indent,eol,start | |
| " turn on line numbers | |
| set number | |
| " highlight tailing whitespace | |
| set list listchars=tab:\ \ ,trail:· | |
| " get rid of the delay when pressing O (for example) | |
| " http://stackoverflow.com/questions/2158516/vim-delay-before-o-opens-a-new-line | |
| set timeout timeoutlen=1000 ttimeoutlen=100 | |
| " always show status bar | |
| set laststatus=2 | |
| " set the status line to something useful | |
| set statusline=%f\ %=L:%l/%L\ %c\ (%p%%) | |
| " hide the toolbar | |
| set guioptions-=T | |
| " utf encoding | |
| set encoding=utf-8 | |
| " autoload files that have changed outside of vim | |
| set autoread | |
| " remove whitespace on save | |
| autocmd BufWritePre * :%s/\s\+$//e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment