2019-04-12 19:04:50 +02:00
|
|
|
set nocompatible
|
2019-05-15 03:29:22 +02:00
|
|
|
filetype off "required
|
2019-04-12 19:04:50 +02:00
|
|
|
set rtp+=~/.vim/bundle/Vundle.vim
|
|
|
|
|
|
|
|
call vundle#begin()
|
|
|
|
" alternatively, pass a path where Vundle should install plugins
|
|
|
|
"call vundle#begin('~/some/path/here')
|
|
|
|
|
|
|
|
" let Vundle manage Vundle, required
|
|
|
|
Plugin 'VundleVim/Vundle.vim'
|
|
|
|
|
|
|
|
" The following are examples of different formats supported.
|
|
|
|
" Keep Plugin commands between vundle#begin/end.
|
|
|
|
" plugin on GitHub repo
|
|
|
|
|
|
|
|
"myplugins
|
|
|
|
"Plugin 'valloric/youcompleteme'
|
|
|
|
Plugin 'shougo/neocomplete.vim'
|
|
|
|
|
|
|
|
call vundle#end()
|
2019-05-15 03:29:22 +02:00
|
|
|
filetype plugin on " required
|
2019-04-12 19:04:50 +02:00
|
|
|
" To ignore plugin indent changes, instead use:
|
|
|
|
"filetype plugin on
|
|
|
|
"
|
|
|
|
" Brief help
|
|
|
|
" :PluginList - lists configured plugins
|
|
|
|
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
|
|
|
|
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
|
|
|
|
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
|
|
|
|
"
|
|
|
|
" see :h vundle for more details or wiki for FAQ
|
|
|
|
" Put your non-Plugin stuff after this line
|
|
|
|
|
|
|
|
" Disable AutoComplPop.
|
|
|
|
let g:acp_enableAtStartup = 0
|
|
|
|
" Use neocomplete.
|
|
|
|
let g:neocomplete#enable_at_startup = 1
|
|
|
|
" Use smartcase.
|
|
|
|
let g:neocomplete#enable_smart_case = 1
|
|
|
|
" Set minimum syntax keyword length.
|
|
|
|
let g:neocomplete#sources#syntax#min_keyword_length = 3
|
|
|
|
|
|
|
|
" Define dictionary.
|
|
|
|
let g:neocomplete#sources#dictionary#dictionaries = {
|
|
|
|
\ 'default' : '',
|
|
|
|
\ 'vimshell' : $HOME.'/.vimshell_hist',
|
|
|
|
\ 'scheme' : $HOME.'/.gosh_completions'
|
|
|
|
\ }
|
|
|
|
|
|
|
|
" Define keyword.
|
|
|
|
if !exists('g:neocomplete#keyword_patterns')
|
|
|
|
let g:neocomplete#keyword_patterns = {}
|
|
|
|
endif
|
|
|
|
let g:neocomplete#keyword_patterns['default'] = '\h\w*'
|
|
|
|
|
|
|
|
" Recommended key-mappings.
|
|
|
|
" <CR>: close popup and save indent.
|
|
|
|
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
|
|
|
|
function! s:my_cr_function()
|
|
|
|
return (pumvisible() ? "\<C-y>" : "" ) . "\<CR>"
|
|
|
|
" For no inserting <CR> key.
|
|
|
|
"return pumvisible() ? "\<C-y>" : "\<CR>"
|
|
|
|
endfunction
|
|
|
|
" <TAB>: completion.
|
|
|
|
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
|
|
|
|
2019-05-15 03:29:22 +02:00
|
|
|
" Close popup by <Space>. NO, this makes it slow af to type
|
2019-04-12 19:04:50 +02:00
|
|
|
"inoremap <expr><Space> pumvisible() ? "\<C-y>" : "\<Space>"
|
|
|
|
|
|
|
|
" AutoComplPop like behavior.
|
2019-05-15 03:29:22 +02:00
|
|
|
let g:neocomplete#enable_auto_select = 0
|
2019-04-12 19:04:50 +02:00
|
|
|
|
|
|
|
" Enable omni completion.
|
|
|
|
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
|
|
|
|
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
|
|
|
|
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
|
|
|
|
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
|
|
|
|
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
|
|
|
|
|
|
|
|
" Enable heavy omni completion.
|
|
|
|
if !exists('g:neocomplete#sources#omni#input_patterns')
|
|
|
|
let g:neocomplete#sources#omni#input_patterns = {}
|
|
|
|
endif
|
|
|
|
""""""""""""""""""""""""""""""""""""
|
|
|
|
|
2019-05-21 03:23:09 +02:00
|
|
|
set softtabstop=4
|
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
2019-04-12 19:04:50 +02:00
|
|
|
set expandtab
|
|
|
|
set smarttab
|
|
|
|
|
|
|
|
set errorformat+=%.%#PHP:\ %m\ \(in\ %f\ on\ line\ %l\)%.%#,
|
|
|
|
\%E%[0-9]%#.%m:%f?rev=%.%##L%l\ %.%#,%C%.%#
|
|
|
|
|
|
|
|
autocmd BufNewFile,BufRead svn-commit.*tmp :0r $SVN_COMMIT_TEMPLATE
|
|
|
|
|
|
|
|
set nocompatible
|
|
|
|
set tags=tags;/
|
|
|
|
|
|
|
|
set incsearch " incrimental search
|
|
|
|
set hlsearch " highlighting when searching
|
|
|
|
|
|
|
|
filetype indent plugin off
|
|
|
|
set autoindent
|
|
|
|
set backspace=2
|
|
|
|
|
2019-05-15 03:29:22 +02:00
|
|
|
set nolist " show/hide tabs and EOL chars (hidden characters)
|
|
|
|
set number " show/hide line numbers (nu/nonu)
|
|
|
|
set scrolloff=5 " scroll offset, min lines above/below cursor
|
2019-05-02 01:13:32 +02:00
|
|
|
"set scrolljump=5 " jump 5 lines when running out of the screen - NO
|
2019-05-15 03:29:22 +02:00
|
|
|
set sidescroll=10 " minimum columns to scroll horizontally
|
2019-04-12 19:04:50 +02:00
|
|
|
set showcmd " show command status
|
2019-05-15 03:29:22 +02:00
|
|
|
set showmatch " flashes matching parenthese when cursor over the other one
|
2019-04-12 19:04:50 +02:00
|
|
|
set showmode " show editing mode in status (-- INSERT --)
|
|
|
|
set ruler " show cursor position
|
2019-05-15 03:29:22 +02:00
|
|
|
set errorbells " bells in terminal
|
2019-04-12 19:04:50 +02:00
|
|
|
set undolevels=1000 " number of undos stored
|
|
|
|
set viminfo='50,"50 " '=marks for x files, "=registers for x files
|
|
|
|
|
2019-05-29 00:46:44 +02:00
|
|
|
set nofen
|
|
|
|
"set foldmethod=indent " indent based folding
|
|
|
|
|
|
|
|
" define indent-based folding, after loading a file switch to manual folding
|
|
|
|
augroup vimrc
|
|
|
|
au BufReadPre * setlocal foldmethod=indent
|
|
|
|
au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
" autosave and load views
|
|
|
|
au BufWinLeave ?* mkview
|
|
|
|
au BufWinEnter ?* silent loadview
|
|
|
|
|
|
|
|
au FileType xml setlocal shiftwidth=2 tabstop=2
|
2019-04-12 19:04:50 +02:00
|
|
|
|
2019-05-15 03:29:22 +02:00
|
|
|
au FileType c setl ofu=ccomplete#CompleteCpp
|
|
|
|
au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil*
|
2019-06-27 02:06:07 +02:00
|
|
|
\ setlocal tabstop=4 shiftwidth=4 noexpandtab autoindent
|
2019-04-12 20:35:24 +02:00
|
|
|
\ textwidth=79 fileformat=unix
|
2019-05-21 03:23:09 +02:00
|
|
|
" Linux kernel style tabs
|
2019-05-15 03:29:22 +02:00
|
|
|
au BufNewFile,BufRead *.c,*.h,*.cpp
|
|
|
|
\ setlocal tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent
|
|
|
|
\ textwidth=79 fileformat=unix
|
2019-04-12 20:35:24 +02:00
|
|
|
|
2019-05-02 01:13:32 +02:00
|
|
|
set encoding=utf-8 " important for powerline besides others
|
2019-05-15 03:29:22 +02:00
|
|
|
set scs " override 'ignorecase' when pattern has upper case characters
|
2019-04-12 20:35:24 +02:00
|
|
|
|
2019-04-12 19:04:50 +02:00
|
|
|
|
|
|
|
:vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
|
|
|
|
:nmap gb :!git blame %<CR>
|
|
|
|
|
2019-05-15 03:29:22 +02:00
|
|
|
:colo pablo " new fav highlighting
|
|
|
|
:set mouse=a " enable mouse in n,v,i,c,h modes
|
|
|
|
|
|
|
|
":set cursorline " Enable cursor line position tracking
|
|
|
|
":highlight clear CursorLine " Remove the underline from enabling cursorline
|
|
|
|
":highlight CursorLineNR ctermbg=darkgrey " Set line numbering to red background
|
|
|
|
|
2019-05-02 01:13:32 +02:00
|
|
|
:set laststatus=2 " show powerline status bar
|
2019-04-29 00:42:36 +02:00
|
|
|
set t_Co=256
|
|
|
|
let g:Powerline_symbols = "fancy" " sth like this probably set as a default but won't hurt here
|