2015-07-12 17:50:37 +02:00
|
|
|
" 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/'}
|
2017-02-12 07:45:14 +01:00
|
|
|
Plugin 'tomasr/molokai'
|
2017-02-13 06:40:24 +01:00
|
|
|
"Bundle 'Shougo/neosnippet'
|
|
|
|
"Bundle 'Shougo/neosnippet-snippets'
|
2015-07-12 17:50:37 +02:00
|
|
|
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'
|
2015-07-12 17:50:37 +02:00
|
|
|
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'
|
2016-04-10 14:06:36 +02:00
|
|
|
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'
|
2017-09-01 18:39:06 +02:00
|
|
|
Plugin 'godlygeek/tabular'
|
2015-07-12 17:50:37 +02:00
|
|
|
|
|
|
|
call vundle#end() " required
|
|
|
|
filetype plugin indent on " required
|
|
|
|
|
2017-02-13 06:40:24 +01:00
|
|
|
""" UNDOTREE """
|
|
|
|
|
|
|
|
nmap <F7> :UndotreeToggle<CR>:UndotreeFocus<CR>
|
|
|
|
|
2015-07-12 17:50:37 +02:00
|
|
|
""" CTRLP """
|
|
|
|
|
|
|
|
let g:ctrlp_custom_ignore = {
|
2017-09-01 18:39:06 +02:00
|
|
|
\ 'dir': '\v([\/]\.(git|hg|svn)|log|node_modules|bower_components|__pycache__|vendor|output|buildroot|doc)$',
|
2017-07-26 09:42:41 +02:00
|
|
|
\ 'file': '\v\.(exe|so|dll|o|pyc)$',
|
2015-07-12 17:50:37 +02:00
|
|
|
\ '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>
|
|
|
|
|
2015-07-12 17:50:37 +02:00
|
|
|
""" VIM-AIRLINE """
|
|
|
|
|
|
|
|
set noshowmode
|
|
|
|
set laststatus=2
|
|
|
|
let g:airline_powerline_fonts = 1
|
2017-01-14 16:46:30 +01:00
|
|
|
" let g:airline#extensions#syntastic#enabled = 1
|
2015-07-12 17:50:37 +02:00
|
|
|
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'])
|
2017-02-12 07:45:14 +01:00
|
|
|
let g:airline_theme = 'wombat'
|
2015-07-12 17:50:37 +02:00
|
|
|
|
2017-01-14 16:46:30 +01:00
|
|
|
""" 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'
|
|
|
|
|
2017-09-01 18:39:06 +02:00
|
|
|
nmap gTi :YcmCompleter GoToInclude<CR>
|
|
|
|
nmap gTc :YcmCompleter GoToDeclaration<CR>
|
|
|
|
nmap gTf :YcmCompleter GoToDefinition<CR>
|
|
|
|
nmap gt :YcmCompleter GoTo<CR>
|
|
|
|
nmap gT :YcmCompleter GoToImprecise<CR>
|
|
|
|
nmap gTr :YcmCompleter GoToReference<CR>
|
|
|
|
|
2017-07-26 09:42:41 +02:00
|
|
|
""" AUTOFORMAT """
|
|
|
|
nmap <F3> :Autoformat<CR>
|
2017-01-14 16:46:30 +01:00
|
|
|
|
2017-02-13 06:40:24 +01:00
|
|
|
""" JAVACOMPLETE """
|
|
|
|
|
|
|
|
autocmd FileType java setlocal omnifunc=javacomplete#Complete
|
2016-02-20 23:53:40 +01:00
|
|
|
|
2015-07-12 17:50:37 +02: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
|
|
|
|
|
2015-07-12 17:50:37 +02:00
|
|
|
set visualbell
|
|
|
|
set noerrorbells
|
|
|
|
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
|
|
|
|
set hidden
|
2016-02-20 23:53:40 +01:00
|
|
|
set updatetime=250
|
2015-07-12 17:50:37 +02:00
|
|
|
|
2017-01-14 16:46:30 +01:00
|
|
|
set cursorcolumn
|
|
|
|
|
2015-07-12 17:50:37 +02:00
|
|
|
syntax enable
|
|
|
|
|
|
|
|
set background=dark
|
2017-02-12 07:45:14 +01:00
|
|
|
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=↪
|
2015-07-12 17:50:37 +02:00
|
|
|
|
|
|
|
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 %
|
|
|
|
|
2017-01-14 16:46:30 +01:00
|
|
|
imap jk <Esc>
|
2017-01-14 18:34:14 +01:00
|
|
|
imap mù <Esc>
|
2015-07-12 17:50:37 +02:00
|
|
|
map <Enter> o<Esc>
|
2017-09-01 18:39:06 +02:00
|
|
|
nmap <C-H> :bp<CR>
|
|
|
|
nmap <C-L> :bn<CR>
|
|
|
|
nmap <C-K> kkkkkkkkkkkkkkkkkkkkk
|
|
|
|
nmap <C-J> jjjjjjjjjjjjjjjjjjjjj
|
2017-07-26 09:42:41 +02:00
|
|
|
|
2015-07-12 17:50:37 +02:00
|
|
|
|