Created
June 11, 2019 22:32
-
-
Save lpabon/5d8baa164a82674e7f86ffc4055d059e to your computer and use it in GitHub Desktop.
My personal VIMRC
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 nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
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' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'fatih/vim-go' | |
Plugin 'Valloric/YouCompleteMe' | |
Plugin 'bronson/vim-trailing-whitespace' | |
Plugin 'tpope/vim-fugitive' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent 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 | |
" | |
let color = "true" | |
" | |
if has("gui") | |
" No tearoff menus | |
set guioptions-=t | |
" No toolbar | |
set guioptions-=T | |
" Always use both toolbars to help X maintian window size | |
set guioptions-=L | |
set guioptions+=r | |
"Icon | |
set guioptions+=l | |
" Use console dialogs | |
set guioptions+=c | |
" No automatic fork to the background | |
set guioptions+=f | |
if has("gui_kde") | |
"set guifont=Fixed\ [Misc]/11/-1/5/50/0/0/0/1/0 | |
set guifont=Andale\ Mono/10/-1/5/50/0/0/0/1/0 | |
elseif has("unix") | |
set guifont=-adobe-courier-medium-r-normal-*-*-120-*-*-m-*-hp-roman8 | |
endif | |
" Don't use autoselect in non-unix environments | |
if !has("unix") | |
set guioptions-=a | |
endif | |
if has("win32") | |
set lines=50 | |
set columns=100 | |
endif | |
" ALT-SPACE is System menu | |
nmap <M-Space> :simalt ~<CR> | |
imap <M-Space> <C-O>:simalt ~<CR> | |
cmap <M-Space> <C-C>:simalt ~<CR> | |
" Colors | |
"if v:version >= 600 | |
colorscheme northsky | |
colorscheme northsky | |
"else | |
" set background=light | |
" source ~/.vim/colors/northsky.vim | |
"endif | |
syntax on | |
else | |
if has("syntax") | |
if color == "true" | |
" This will switch colors ON | |
"so ${VIMRUNTIME}/syntax/syntax.vim | |
"colorscheme evening | |
colorscheme desert | |
syntax on | |
else | |
" this switches colors OFF | |
syntax off | |
set t_Co=0 | |
endif | |
endif | |
endif | |
if has("autocmd") | |
if v:version >= 600 | |
" Enable file type detection. | |
" Use the default filetype settings, so that mail gets 'tw' set to 72, | |
" 'cindent' is on in C files, etc. | |
" Also load indent files, to automatically do language-dependent indenting. | |
filetype plugin indent on | |
endif | |
endif | |
set textwidth=120 | |
set wrapmargin=120 | |
"set mouse=a | |
set nomousefocus | |
set mousehide | |
set laststatus=2 | |
set backspace=2 whichwrap+=<,>,[,] | |
set history=50 | |
set viminfo='20,\"50,n$HOME/.viminfo | |
set visualbell | |
set autoindent | |
set smartindent | |
set sw=4 | |
set tabstop=4 | |
set smarttab | |
set number | |
highlight LineNr ctermfg=darkgrey | |
"set expandtab | |
set shiftround | |
set ruler | |
set showmode | |
set showcmd | |
set tildeop | |
set showmatch | |
set nowrap | |
set nosol | |
set autowrite | |
set wc=9 | |
set wcm=0 | |
set nowmnu | |
set wildmenu | |
set tags=tags,./tags | |
set nohlsearch | |
set incsearch | |
set showcmd | |
set cmdheight=1 | |
set cmdwinheight=10 | |
set gdefault | |
set infercase | |
set splitbelow | |
set splitright | |
set hidden | |
"set textwidth=0 | |
set laststatus=2 | |
set lazyredraw | |
"Cscope Quickfix | |
let Cscope_JumpError = 0 | |
"let Cscope_PopupMenu = 1 | |
"Commands here | |
"vsplit | |
"wincmd h | |
"split | |
"wincmd j | |
"wincmd l | |
" Ctrl-S is save | |
map <C-S> :w<CR> | |
imap <C-S> <C-O><C-S> | |
vmap <C-S> <C-C><C-S> | |
" Leader commands | |
map <leader>bn :bn<CR> | |
map <leader>ls :ls<CR> | |
" File explorer | |
map <leader>x :Explore<CR> | |
map <leader>sx :Sexplore<CR> | |
" Outline plugin | |
map <leader>ou :OUTLINE<CR> | |
au FileType proto setl sw=2 ts=2 expandtab list | |
au FileType yaml setl expandtab list | |
au BufNewFile,BufRead *.gtpl setl expandtab list | |
" Go through error in go | |
map ,, :cn<CR> | |
map ,p :cp<CR> | |
map ,c :ccl<CR> | |
map ,o :copen<CR> | |
" Fast lookup of opened files | |
nnoremap gb :ls<CR>:b<Space> | |
" Markdown editing | |
" To reformat existing lines, select them then use `gq` | |
au FileType markdown setl sw=4 ts=4 expandtab list colorcolumn=85 textwidth=80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment