Last active
August 29, 2015 14:15
-
-
Save roobie/949b1922b4fdbcf77a9e to your computer and use it in GitHub Desktop.
my vimrc
This file contains 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
" vim:foldmethod=marker:foldlevel=0:foldnestmax=1 | |
" Recommended plugins: {{{ | |
" ag.vim | |
" badwolf | |
" ctrlp.vim | |
" gundo.vim | |
" npm-debug.log | |
" supertab | |
" syntastic | |
" tabline.vim | |
" tern_for_vim | |
" tlib_vim | |
" vim-addon-mw-utils | |
" vim-airline | |
" vim-signify | |
" vim-snipmate | |
" vim-snippets | |
" }}} | |
" use the following plugins {{{ | |
" }}} | |
set nocompatible | |
" Autoload vimrc changes {{{ | |
autocmd! bufwritepost .vimrc source % | |
" }}} | |
"" Plugin initialisation {{{ | |
execute pathogen#infect() | |
" }}} | |
"" Colours {{{ | |
colorscheme badwolf | |
syntax enable | |
" }}} | |
"" Human language settings {{{ | |
set langmenu=en_GB.UTF-8 | |
let $LANG = 'en_US' | |
" }}} | |
"" General {{{ | |
set number " Show line numbers | |
set linebreak " Break lines at word (requires Wrap lines) | |
set showbreak=+++ " Wrap-broken line prefix | |
set textwidth=100 " Line wrap (number of cols) | |
set showmatch " Highlight matching brace | |
" set spell " Enable spell-checking | |
set visualbell " Use visual bell (no beeping) | |
set showcmd | |
set cursorline | |
filetype plugin on | |
filetype indent on | |
set omnifunc=syntaxcomplete#Complete | |
set wildmenu " visual autocomplete | |
set lazyredraw " redraw only when needed | |
set showmatch " highlite matching parens | |
set foldenable " enable code folding | |
set foldlevelstart=10 " open most folds by default | |
set foldnestmax=4 " max nested level of default folding | |
set foldmethod=indent " fold depending on the indent level | |
set hlsearch " Highlight all search results | |
set smartcase " Enable smart-case search | |
set ignorecase " Always case-insensitive | |
set incsearch " Searches for strings incrementally | |
set expandtab " Use spaces instead of tabs | |
set shiftwidth=2 " Number of auto-indent spaces | |
set smarttab " Enable smart-tabs | |
set softtabstop=2 " Number of spaces per Tab | |
set autochdir " Change dir automatically to current file | |
:set laststatus=2 " Always show statusbar | |
" set smartindent " Enable smart-indent | |
" set autoindent " Auto-indent new lines | |
" }}} | |
"" GUI Opts {{{ | |
:set guioptions-=m "remove menu bar | |
:set guioptions-=T "remove toolbar | |
:set guioptions-=r "remove right-hand scroll bar | |
:set guioptions-=L "remove left-hand scroll bar | |
if has('gui_running') | |
set guifont=DejaVu_Sans_Mono:h11 | |
endif | |
" }}} | |
"" Advanced {{{ | |
set ruler " Show row and column ruler information | |
set undolevels=1000 " Number of undo levels | |
set backspace=indent,eol,start " Backspace behaviour | |
" }}} | |
"" Plugin settings {{{ | |
"" CtrlP | |
let g:ctrlp_match_window = 'bottom,order:ttb' | |
"let g:ctrlp_switch_buffer = 0 | |
"let g:ctrlp_working_path_mode = 0 | |
"let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""' | |
if exists("g:ctrlp_user_command") | |
unlet g:ctrlp_user_command | |
endif | |
if executable('ag') | |
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore | |
if has( 'unix' ) | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
elsif has( 'win32' ) | |
" ? | |
let g:ctrlp_user_command = 'ag -l --nocolor -g "" %s' | |
endif | |
" ag is fast enough that CtrlP doesn't need to cache | |
let g:ctrlp_use_caching = 0 | |
else | |
" Fall back to using git ls-files if Ag is not available | |
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' | |
let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'] | |
endif | |
"" Airline | |
let g:airline#extensions#tabline#enabled = 1 | |
" }}} | |
" Custom keys {{{ | |
let mapleader="," | |
inoremap jk <esc> | |
" Navigate splits {{{ | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" }}} | |
" }}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment