Created
December 23, 2017 16:29
-
-
Save g4rcez/6630ef4a1a84ac73969f2af60e139360 to your computer and use it in GitHub Desktop.
My vimrc config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 | |
scriptencoding utf-8 | |
set fileencoding=utf-8 | |
set bomb | |
set binary | |
set ttyfast | |
set nocompatible " not compatible with the old-fashion vi mode | |
set bs=2 " allow backspacing over everything in insert mode | |
set history=50 " keep 50 lines of command line history | |
set ruler " show the cursor position all the time | |
set autoread | |
set hlsearch | |
set autoindent " auto indentation | |
set incsearch " incremental search | |
set nobackup " no *~ backup files | |
set copyindent " copy the previous indentation on autoindenting | |
set ignorecase " ignore case when searching | |
set smartcase " ignore case if search pattern is all lowercase,case-sensitive otherwise | |
set smarttab | |
" go to prev tab | |
map <S-H> gT | |
" go to next tab | |
map <S-L> gt | |
" new tab | |
map <C-t><C-t> :tabnew<CR> | |
" close tab | |
map <C-t><C-w> :tabclose<CR> | |
"""" START Vundle Configuration | |
" Disable file type for vundle | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' | |
" Utility | |
Plugin 'scrooloose/nerdtree' | |
Plugin 'BufOnly.vim' | |
Plugin 'wesQ3/vim-windowswap' | |
Plugin 'junegunn/fzf.vim' | |
Plugin 'junegunn/fzf' | |
Plugin 'tpope/vim-dispatch' | |
" Generic Programming Support | |
Plugin 'honza/vim-snippets' | |
Plugin 'Townk/vim-autoclose' | |
Plugin 'tomtom/tcomment_vim' | |
Plugin 'janko-m/vim-test' | |
Plugin 'maksimr/vim-jsbeautify' | |
Plugin 'vim-syntastic/syntastic' | |
" Markdown / Writting | |
Plugin 'reedes/vim-pencil' | |
Plugin 'tpope/vim-markdown' | |
Plugin 'jtratner/vim-flavored-markdown' | |
Plugin 'LanguageTool' | |
" Git Support | |
Plugin 'kablamo/vim-git-log' | |
Plugin 'gregsexton/gitv' | |
Plugin 'tpope/vim-fugitive' | |
" Theme / Interface | |
Plugin 'AnsiEsc.vim' | |
Plugin 'ryanoasis/vim-devicons' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'sjl/badwolf' | |
Plugin 'tomasr/molokai' | |
Plugin 'morhetz/gruvbox' | |
Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'} | |
Plugin 'junegunn/limelight.vim' | |
Plugin 'mkarmona/colorsbox' | |
Plugin 'romainl/Apprentice' | |
Plugin 'Lokaltog/vim-distinguished' | |
Plugin 'chriskempson/base16-vim' | |
Plugin 'w0ng/vim-hybrid' | |
Plugin 'AlessandroYorba/Sierra' | |
Plugin 'daylerees/colour-schemes' | |
Plugin 'effkay/argonaut.vim' | |
Plugin 'ajh17/Spacegray.vim' | |
Plugin 'atelierbram/Base2Tone-vim' | |
Plugin 'colepeters/spacemacs-theme.vim' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
"""" END Vundle Configuration | |
""""""""""""""""""""""""""""""""""""" | |
" Configuration Section | |
""""""""""""""""""""""""""""""""""""" | |
set nowrap | |
" Show linenumbers | |
set number | |
" Set Proper Tabs | |
set tabstop=4 | |
set shiftwidth=4 | |
set smarttab | |
set expandtab | |
" Always display the status line | |
set laststatus=1 | |
" Enable Elite mode, No ARRRROWWS!!!! | |
let g:elite_mode=0 | |
" Enable highlighting of the current line | |
set cursorline | |
" Theme and Styling | |
syntax on | |
set t_Co=256 | |
if (has("termguicolors")) | |
set termguicolors | |
endif | |
colorscheme molokai | |
set background=dark | |
let base16colorspace=256 " Access colors present in 256 colorspace | |
let g:spacegray_underline_search = 1 | |
let g:spacegray_italicize_comments = 1 | |
" Vim-Airline Configuration | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline_powerline_fonts = 1 | |
let g:airline_theme='hybrid' | |
let g:hybrid_custom_term_colors = 1 | |
let g:hybrid_reduced_contrast = 1 | |
" Vim-Supertab Configuration | |
let g:SuperTabDefaultCompletionType = "<C-X><C-O>" | |
" Settings for Writting | |
let g:pencil#wrapModeDefault = 'soft' " default is 'hard' | |
let g:languagetool_jar = '/opt/languagetool/languagetool-commandline.jar' | |
" Neocomplete Settings | |
let g:acp_enableAtStartup = 0 | |
let g:neocomplete#enable_at_startup = 1 | |
let g:neocomplete#enable_smart_case = 1 | |
let g:neocomplete#sources#syntax#min_keyword_length = 3 | |
" Define keyword. | |
if !exists('g:neocomplete#keyword_patterns') | |
let g:neocomplete#keyword_patterns = {} | |
endif | |
let g:neocomplete#keyword_patterns['default'] = '\h\w*' | |
" 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 | |
"Save,exit and quit | |
inoremap <C-s> <esc>:w<cr> " save files | |
nnoremap <C-s> :w<cr> | |
inoremap <C-d> <esc>:wq!<cr> " save and exit | |
nnoremap <C-d> :wq!<cr> | |
inoremap <C-q> <esc>:qa!<cr> " quit discarding changes | |
nnoremap <C-q> :qa!<cr> | |
if isdirectory(expand('~/.vim/bundle/nerdtree')) | |
map <C-e> :NERDTreeToggle<CR> | |
map <leader>e :NERDTreeFind<CR> | |
nmap <leader>nt :NERDTreeFind<CR> | |
let g:NERDTreeShowBookmarks=1 | |
let g:NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$','^\.svn$', '\.bzr$'] | |
let g:NERDTreeChDirMode=0 | |
let g:NERDTreeQuitOnOpen=1 | |
let g:NERDTreeMouseMode=2 | |
let g:NERDTreeShowHidden=1 | |
let g:NERDTreeKeepTreeInNewTab=1 | |
let g:NERDTreeDirArrows = 0 | |
let g:nerdtree_tabs_open_on_gui_startup=0 | |
endif | |
au BufRead,BufNewFile *.h set ft=c | |
au BufRead,BufNewFile *.i set ft=c | |
au BufRead,BufNewFile *.phpt set ft=php | |
au BufRead,BufNewFile *.inc set ft=php | |
au BufRead,BufNewFile *.sql set ft=mysql | |
au BufRead,BufNewFile *.txt set ft=txt | |
au BufRead,BufNewFile *.log set ft=conf | |
au BufRead,BufNewFile hosts set ft=conf | |
au BufRead,BufNewFile http*.conf set ft=apache | |
au BufRead,BufNewFile */nginx/*.conf set ft=nginx | |
au BufRead,BufNewFile */nginx/**/*.conf set ft=nginx | |
au BufRead,BufNewFile */openresty/*.conf set ft=nginx | |
au BufRead,BufNewFile */openresty/**/*.conf set ft=nginx | |
au BufRead,BufNewFile *.yml.bak set ft=yaml | |
au BufRead,BufNewFile *.yml.default set ft=yaml | |
au BufRead,BufNewFile *.yml.example set ft=yaml | |
au BufRead,BufNewFile CMakeLists.txt set ft=cmake |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment