Added vimrc

This commit is contained in:
fedora 2019-04-12 19:04:50 +02:00
parent dac6f12eb8
commit aaa48ecddf
Signed by: wanderer
GPG Key ID: 7B28D8DC28BD2388

150
vimrc Normal file

@ -0,0 +1,150 @@
set nocompatible
filetype off "required
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()
filetype plugin on " required
" 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>"
" Close popup by <Space>.
"inoremap <expr><Space> pumvisible() ? "\<C-y>" : "\<Space>"
" AutoComplPop like behavior.
"let g:neocomplete#enable_auto_select = 1
" 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
""""""""""""""""""""""""""""""""""""
set softtabstop=2
set tabstop=2
set shiftwidth=2
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
set nolist " show/hide tabs and EOL chars
set nonumber " show/hide line numbers (nu/nonu)
set scrolloff=5 " scroll offsett, min lines above/below cursor
set scrolljump=5 " jump 5 lines when running out of the screen
set sidescroll=10 " minumum columns to scroll horizontally
set showcmd " show command status
set showmatch " flashes matching paren when one is typed
set showmode " show editing mode in status (-- INSERT --)
set ruler " show cursor position
set nofen
set foldmethod=indent " indent based folding
set noerrorbells " no bells in terminal
set undolevels=1000 " number of undos stored
set viminfo='50,"50 " '=marks for x files, "=registers for x files
:vmap gb :<C-U>!git blame % -L<C-R>=line("'<") <CR>,<C-R>=line("'>") <CR><CR>
:nmap gb :!git blame %<CR>
if &t_Co > 2 || has("gui_running")
:syntax on
" Change the highlight color for Comment and Special
" to Cyan. Blue is too dark for a black background.
"
:highlight Comment term=bold ctermfg=cyan guifg=cyan
:highlight Special term=bold ctermfg=cyan guifg=cyan
:highlight Constant term=bold ctermfg=red guifg=cyan
endif
:colo elflord