dotvim/vimrc

139 lines
4.0 KiB
VimL
Raw Normal View History

2015-10-10 15:34:29 +02:00
""
"" Environment
""
2015-10-10 19:38:14 +02:00
" Vim environment
2015-10-10 15:34:29 +02:00
set directory=$XDG_CACHE_HOME/vim,~/,/tmp
set backupdir=$XDG_CACHE_HOME/vim,~/,/tmp
set viminfo+=n$XDG_CACHE_HOME/vim/viminfo
2015-10-12 00:09:41 +02:00
set rtp=$XDG_CONFIG_HOME/vim,$VIM,$VIMRUNTIME
2015-10-10 15:34:29 +02:00
let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
2015-10-10 19:38:14 +02:00
" Ctags data
2015-10-10 17:23:21 +02:00
set tags=$XDG_CACHE_HOME/vim/tags
2015-10-10 19:38:14 +02:00
" Keep history
2015-11-20 00:09:29 +01:00
set undodir=$XDG_CACHE_HOME/vim/undo
2015-10-10 17:23:21 +02:00
set undofile
2013-11-22 18:20:32 +01:00
2015-10-11 14:52:54 +02:00
""
"" Plugins
""
set rtp+=$XDG_CACHE_HOME/vim/plugins/Vundle.vim
call vundle#begin('$XDG_CACHE_HOME/vim/plugins')
Plugin 'VundleVim/Vundle.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'itchyny/lightline.vim'
Plugin 'townk/vim-autoclose'
Plugin 'tpope/vim-fugitive'
Plugin 'travitch/hasksyn'
2015-10-11 15:05:33 +02:00
Plugin 'plasticboy/vim-markdown'
Plugin 'LnL7/vim-nix'
2015-10-11 14:52:54 +02:00
Plugin 'ervandew/supertab'
Plugin 'majutsushi/tagbar'
Plugin 'scrooloose/syntastic'
call vundle#end()
2013-11-22 18:20:32 +01:00
""
2015-10-10 17:36:28 +02:00
"" Options
2013-11-22 18:20:32 +01:00
""
2015-10-10 17:36:28 +02:00
set nocompatible " Disable vi compatibility
set backspace=2 " Fix DEL in the terminal
set hidden " Hide buffers
set incsearch " Incremental search
set hlsearch " Highlight search results
2015-10-10 15:34:29 +02:00
2015-10-10 17:36:28 +02:00
set ignorecase " Case insensitive search...
set smartcase " ...for lowercase terms
set laststatus=2 "
set mouse=a " Enable mouse support
set showcmd " Show command while writing it
set ruler " Show line/column position
2016-01-17 16:04:28 +01:00
set nowrap " Disable line wrap
2015-10-11 13:55:15 +02:00
set novb " Disable visual beep
2015-10-11 15:05:33 +02:00
set nofoldenable " Disable folding
2015-10-10 17:36:28 +02:00
set nobackup " Disable ~backup
set noswapfile " Disable swap files
set writebackup " Enable temp backups
set wildmenu " Enable cmd autocompletion
set encoding=utf-8 " Default encoding
set nomodeline " Security
set tabpagemax=10 " Limit number of tabs to 10
set showmatch " Highlight matched parenthesis
set ffs=unix " Use UNIX file format
set clipboard=unnamed " Clipboard integration
set ttyfast " Improve redrawing in xterm
filetype indent plugin on " Identify file type
set wildignore+=*/tmp/*,*.so,*.swp " Files to ignore
2015-10-12 00:09:54 +02:00
set shiftwidth=2 " Tab
set tabstop=2 "
set expandtab "
2015-10-10 17:36:28 +02:00
set number " Line numbering
set autoindent " Indentation
set smartindent "
set noshowmode "
2015-10-10 19:38:14 +02:00
syntax on " Syntax highlighting
2015-10-11 13:55:15 +02:00
source $XDG_CONFIG_HOME/vim/colors.vim
2015-10-10 17:36:28 +02:00
2015-10-10 19:38:14 +02:00
" Titlebar without “-VIM”
2015-10-10 17:36:28 +02:00
set titlestring=%t%(\ %M%)%(\ (%{expand(\"%:p:h\")})%)%(\ %a%)
2015-10-10 15:34:29 +02:00
2013-11-22 18:20:32 +01:00
""
2015-10-10 17:36:28 +02:00
"" Key bindings
2013-11-22 18:20:32 +01:00
""
2015-10-11 14:52:54 +02:00
let mapleader=","
2013-11-22 18:20:32 +01:00
2015-10-10 17:23:21 +02:00
" Windows navigation
map <C-k> <C-w><Up>
map <C-j> <C-w><Down>
map <C-l> <C-w><Right>
map <C-h> <C-w><Left>
2013-11-22 18:20:32 +01:00
2015-10-11 14:52:54 +02:00
map <Leader>t :TagbarToggle<CR>
inoremap jj <ESC>
2013-11-22 18:20:32 +01:00
""
2015-10-10 17:23:21 +02:00
"" Plugin options
2013-11-22 18:20:32 +01:00
""
2015-10-10 17:23:21 +02:00
" Lightline
source $XDG_CONFIG_HOME/vim/lightline.vim
2013-11-22 18:20:32 +01:00
2015-10-10 17:23:21 +02:00
" Syntastic
2015-10-10 19:38:14 +02:00
let g:syntastic_check_on_open = 1
let g:syntastic_enable_signs = 1
let g:syntastic_python_checkers = ["flake8", "python"]
2015-10-10 17:23:21 +02:00
let g:syntastic_python_python_exe = 'python3'
2013-11-22 18:20:32 +01:00
2015-10-10 17:23:21 +02:00
" Tagbar
let g:tagbar_status_func = "TagbarStatusFunc"
2015-10-10 19:38:14 +02:00
let g:tagbar_compact = 1
let g:tagbar_iconchars = [">", ""]
2013-11-22 18:20:32 +01:00
2015-10-10 17:23:21 +02:00
" MiniBufferExplorer
2015-10-10 19:38:14 +02:00
let g:miniBufExplMapWindowNavVim = 1
2015-10-10 17:23:21 +02:00
let g:miniBufExplMapWindowNavArrows = 1
2015-10-10 19:38:14 +02:00
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
2013-11-22 18:20:32 +01:00
2015-10-10 17:23:21 +02:00
" CtrlP
2015-10-10 19:38:14 +02:00
let g:ctrlp_clear_cache_on_exit = 0
2015-10-10 17:23:21 +02:00
let g:ctrlp_custom_ignore = {"dir": "\v[\/]\.(git|hg|svn|ve)$"}
2015-10-10 19:38:14 +02:00
let g:ctrlp_status_func = {"main": "CtrlPStatusMain",
\"prog": "CtrlPStatusProg"}
2013-11-22 18:20:32 +01:00