123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- " Vim configuration file.
- set shell=/usr/bin/zsh
- set nocompatible
- filetype off
- filetype plugin indent off
- " Begin vundle setup
- set rtp+=~/.vim/bundle/Vundle.vim
- call vundle#rc()
- filetype plugin on
- filetype plugin indent on
- syntax on
- " Bundles
- Bundle 'VundleVim/Vundle.vim'
- Bundle 'itchyny/lightline.vim'
- Bundle 'tpope/vim-fugitive'
- Bundle 'scrooloose/nerdtree'
- Bundle 'scrooloose/syntastic'
- Bundle 'ervandew/supertab'
- Bundle 'majutsushi/tagbar'
- Bundle 'fatih/vim-go'
- Bundle 'klen/python-mode'
- Bundle 'chriskempson/base16-vim'
- " Lightline
- set guifont=Terminess\ Powerline
- set ambiwidth=single
- set laststatus=2
- let g:lightline = {}
- let g:lightline.colorscheme = 'wombat'
- let g:lightline.separator = { 'left': '', 'right': '' }
- let g:lightline.subseparator = { 'left': '', 'right': '' }
- " Nerdtree
- map <F2> :NERDTreeToggle<CR>
- " Tagbar
- map <F3> :TagbarToggle<CR>
- " Sytastic
- let g:syntastic_always_populate_loc_list = 1
- " SuperTab
- let g:SuperTabDefaultCompletionType = "context"
- " Autoformatting
- augroup vimrc_autocmds
- autocmd!
- " Highlight characters past column 120
- autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
- autocmd FileType python match Excess /\%120v.*/
- autocmd FileType python set nowrap
- " Format go files on save
- autocmd FileType go autocmd BufWritePre <buffer> Fmt
- autocmd BufWritePost $HOME/.vimrc nested source $HOME/.vimrc
- augroup END
- au BufNewFile,BufRead *Pkgfile set filetype=sh
- " Common settings
- set tabstop=4 " Number of spaces that a <Tab> in the file counts for.
- set softtabstop=4
- set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
- set expandtab " Use the appropriate number of spaces to insert a <Tab>.
- " Spaces are used in indents with the '>' and '<' commands
- " and when 'autoindent' is on. To insert a real tab when
- " 'expandtab' is on, use CTRL-V <Tab>.
-
- set smarttab " When on, a <Tab> in front of a line inserts blanks
- " according to 'shiftwidth'. 'tabstop' is used in other
- " places. A <BS> will delete a 'shiftwidth' worth of space
- " at the start of the line.
-
- set showcmd " Show (partial) command in status line.
- set number " Show line numbers.
- set showmatch " When a bracket is inserted, briefly jump to the matching
- " one. The jump is only done if the match can be seen on the
- " screen. The time to show the match can be set with
- " 'matchtime'.
-
- set hlsearch " When there is a previous search pattern, highlight all
- " its matches.
-
- set incsearch " While typing a search command, show immediately where the
- " so far typed pattern matches.
-
- set ignorecase " Ignore case in search patterns.
-
- set smartcase " Override the 'ignorecase' option if the search pattern
- " contains upper case characters.
-
- set backspace=2 " Influences the working of <BS>, <Del>, CTRL-W
- " and CTRL-U in Insert mode. This is a list of items,
- " separated by commas. Each item allows a way to backspace
- " over something.
-
- set autoindent " Copy indent from current line when starting a new line
- " (typing <CR> in Insert mode or when using the "o" or "O"
- " command).
- set textwidth=120 " Maximum width of text that is being inserted. A longer
- " line will be broken after white space to get this width.
-
- set formatoptions=q,r,t " This is a sequence of letters which describes how
- " automatic formatting is to be done.
- "
- " letter meaning when present in 'formatoptions'
- " ------ ---------------------------------------
- " c Auto-wrap comments using textwidth, inserting
- " the current comment leader automatically.
- " q Allow formatting of comments with "gq".
- " r Automatically insert the current comment leader
- " after hitting <Enter> in Insert mode.
- " t Auto-wrap text using textwidth (does not apply
- " to comments)
-
- set ruler " Show the line and column number of the cursor position,
- " separated by a comma.
-
- set background=dark " When set to "dark", Vim will try to use colors that look
- " good on a dark background. When set to "light", Vim will
- " try to use colors that look good on a light background.
- " Any other value is illegal.
-
- set mouse=a " Enable the use of the mouse.
- set laststatus=2
- set showtabline=2
- set noshowmode
- set autochdir
- set clipboard=unnamed
- set colorcolumn=120
- set nobackup
- set nowritebackup
- set noswapfile
- set noundofile
- set completeopt=longest,menuone
- set omnifunc=syntaxcomplete#Complete
- set termencoding=utf-8
- set term=xterm-256color
- if has ('gui_running')
- highlight Pmenu guibg=#0a0a0a gui=bold
- else
- set t_Co=256
- endif
- colorscheme Tomorrow-Night
- " Go tags
- let g:tagbar_type_go = {
- \ 'ctagstype' : 'go',
- \ 'kinds' : [
- \ 'p:package',
- \ 'i:imports:1',
- \ 'c:constants',
- \ 'v:variables',
- \ 't:types',
- \ 'n:interfaces',
- \ 'w:fields',
- \ 'e:embedded',
- \ 'm:methods',
- \ 'r:constructor',
- \ 'f:functions'
- \ ],
- \ 'sro' : '.',
- \ 'kind2scope' : {
- \ 't' : 'ctype',
- \ 'n' : 'ntype'
- \ },
- \ 'scope2kind' : {
- \ 'ctype' : 't',
- \ 'ntype' : 'n'
- \ },
- \ 'ctagsbin' : 'gotags',
- \ 'ctagsargs' : '-sort -silent'
- \ }
- " Python mode
- let g:pymode_python = 'python'
- let g:pymode_rope = 1
- let g:pymode_doc = 1
- let g:pymode_doc_key = 'K'
- let g:pymode_lint = 1
- let g:pymode_lint_checker = [ "pyflakes", "pep8" ]
- let g:pymode_lint_write = 1
- let g:pymode_virtualenv = 1
- let g:pymode_breakpoint = 1
- let g:pymode_breakpoint_key = '<leader>b'
- let g:pymode_syntax = 1
- let g:pymode_syntax_all = 1
- let g:pymode_syntax_indent_errors = g:pymode_syntax_all
- let g:pymode_syntax_space_errors = g:pymode_syntax_all
- let g:pymode_options_max_line_length = 120
- let g:pymode_folding = 0
|