dotfiles/vimrc

160 lines
3.4 KiB
VimL
Raw Normal View History

" VIM Configuration - Geoffrey FROGEYE
"
set nocompatible
filetype off
""" PLUGINS MANAGEMENT """
" Voir :h vundle
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'L9'
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
Plugin 'tomasr/molokai'
2017-02-13 06:40:24 +01:00
"Bundle 'Shougo/neosnippet'
"Bundle 'Shougo/neosnippet-snippets'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-repeat'
2017-07-26 09:42:41 +02:00
Plugin 'tpope/tpope-vim-abolish'
2016-02-20 23:53:40 +01:00
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'airblade/vim-gitgutter'
2017-02-18 16:47:30 +01:00
Plugin 'ctrlpvim/ctrlp.vim'
2016-02-20 23:53:40 +01:00
Plugin 'mbbill/undotree'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-easytags'
Plugin 'majutsushi/tagbar'
Plugin 'wellle/targets.vim'
Plugin 'Chiel92/vim-autoformat'
2017-07-26 09:42:41 +02:00
" Plugin 'Valloric/YouCompleteMe'
2017-02-13 06:40:24 +01:00
Plugin 'artur-shaik/vim-javacomplete2'
Plugin 'tomtom/tcomment_vim'
Plugin 'Shougo/denite.nvim'
2017-07-26 09:42:41 +02:00
Plugin 'tomlion/vim-solidity'
call vundle#end() " required
filetype plugin indent on " required
2017-02-13 06:40:24 +01:00
""" UNDOTREE """
nmap <F7> :UndotreeToggle<CR>:UndotreeFocus<CR>
""" CTRLP """
let g:ctrlp_custom_ignore = {
2017-07-26 09:42:41 +02:00
\ 'dir': '\v([\/]\.(git|hg|svn)|log|node_modules|bower_components|__pycache__|vendor|output|buildroot)$',
\ 'file': '\v\.(exe|so|dll|o|pyc)$',
\ 'link': 'SOME_BAD_SYMBOLIC_LINKS',
\ }
2017-07-26 09:42:41 +02:00
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlPMixed'
map <a-p> :CtrlPMRUFiles<CR>
2017-02-13 06:40:24 +01:00
""" TAGBAR """
nmap <F8> :TagbarToggle<CR>
""" VIM-AIRLINE """
set noshowmode
set laststatus=2
let g:airline_powerline_fonts = 1
" let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_section_a = airline#section#create(['mode'])
let g:airline_section_b = airline#section#create(['branch', 'hunks'])
let g:airline_section_z = airline#section#create(['%B', '@', '%l', ':', '%c'])
let g:airline_theme = 'wombat'
""" YOUCOMPLETEME """
2017-07-26 09:42:41 +02:00
" let g:ycm_global_ycm_extra_conf = '~/.config/ycm_extra_conf.py'
let g:ycm_global_ycm_extra_conf = '/usr/share/vim/vimfiles/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_server_python_interpreter = '/usr/bin/python2'
""" AUTOFORMAT """
nmap <F3> :Autoformat<CR>
2017-02-13 06:40:24 +01:00
""" JAVACOMPLETE """
autocmd FileType java setlocal omnifunc=javacomplete#Complete
2016-02-20 23:53:40 +01:00
""" VIM SETTINGS """
set encoding=utf-8
set title
set number
set ruler
set wrap
set scrolloff=5
set ignorecase
set smartcase
set incsearch
set hlsearch
2015-11-20 14:03:59 +01:00
set tabstop=4
set shiftwidth=4
set expandtab
set visualbell
set noerrorbells
set backspace=indent,eol,start
set hidden
2016-02-20 23:53:40 +01:00
set updatetime=250
set cursorcolumn
syntax enable
set background=dark
colorscheme molokai
2017-07-02 22:06:24 +02:00
let g:molokai_original = 1
2016-02-20 23:53:40 +01:00
2016-03-16 14:23:03 +01:00
" From http://stackoverflow.com/a/5004785/2766106
set list
set listchars=tab:╾╌,trail,extends:↦,precedes:↤,nbsp:_
2016-08-03 20:01:24 +02:00
set showbreak=
filetype on
filetype plugin on
filetype indent on
2016-01-12 14:05:27 +01:00
" Put plugins and dictionaries in this dir (also on Windows)
let vimDir = '$HOME/.vim'
let &runtimepath.=','.vimDir
" Keep undo history across sessions by storing it in a file
if has('persistent_undo')
let myUndoDir = expand(vimDir . '/undodir')
" Create dirs
call system('mkdir ' . vimDir)
call system('mkdir ' . myUndoDir)
let &undodir = myUndoDir
set undofile
endif
2017-07-26 09:42:41 +02:00
" Allow saving of files as sudo when I forgot to start vim using sudo.
" From https://stackoverflow.com/a/7078429
cmap w!! w !sudo tee > /dev/null %
imap jk <Esc>
2017-01-14 18:34:14 +01:00
imap <Esc>
map <Enter> o<Esc>
2017-07-26 09:42:41 +02:00
nmap <C-B> :bp<CR>
nmap <C-N> :bn<CR>