Git signify and other changes

This commit is contained in:
Mahesh Asolkar 2019-02-13 21:53:34 -08:00
parent 7435b42689
commit 1c478c51a3

View File

@ -2,17 +2,23 @@
" Vim customization and package management " Vim customization and package management
" "
" This uses Vundle for package management, so following (from Vundle README) " This uses Vundle for package management, so Vundle is installed on the first
" must be run for rest of this vimrc to work: " run.
" "
" % mkdir -p ~/.vim/bundle " Run the following to install plugins:
" % git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"
" Then run the following to install plugins
" "
" * Launch vim and run :PluginInstall " * Launch vim and run :PluginInstall
" * To install from command line: vim +PluginInstall +qall " * To install from command line: vim +PluginInstall +qall
" Vundle Installation {{{
" Bootstrap Vundle if it's not installed
if empty(system("grep lazy_load ~/.vim/bundle/Vundle.vim/autoload/vundle.vim"))
silent !mkdir -p ~/.vim/bundle
silent !rm -rf ~/.vim/bundle/Vundle.vim
silent !git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
endif
" }}}
" Base settings {{{ " Base settings {{{
set nocompatible " be iMproved, required set nocompatible " be iMproved, required
@ -30,7 +36,7 @@
" Vundle setup - Preamble {{{ " Vundle setup - Preamble {{{
set rtp+=~/.vim/bundle/Vundle.vim set runtimepath+=~/.vim/bundle/Vundle.vim
call vundle#begin() call vundle#begin()
Plugin 'VundleVim/Vundle.vim' Plugin 'VundleVim/Vundle.vim'
@ -41,6 +47,8 @@
Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-fugitive'
Plugin 'mhinz/vim-signify'
Plugin 'tmhedberg/matchit'
Plugin 'spf13/vim-colors' Plugin 'spf13/vim-colors'
Plugin 'tpope/vim-surround' Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat' Plugin 'tpope/vim-repeat'
@ -52,6 +60,7 @@
Plugin 'pR0Ps/molokai-dark' Plugin 'pR0Ps/molokai-dark'
Plugin 'nathanaelkane/vim-indent-guides' Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'luochen1990/rainbow' Plugin 'luochen1990/rainbow'
Plugin 'vhda/verilog_systemverilog.vim'
" }}} " }}}
@ -72,17 +81,37 @@
elseif has("win32") elseif has("win32")
set guifont=Iosevka\ Term\ Regular\ 13 set guifont=Iosevka\ Term\ Regular\ 13
else else
set guifont=Iosevka\ Term\ Regular\ 13 set guifont=Iosevka\ Term\ Regular\ 13.5
end end
set columns=120 lines=54 set columns=120 lines=54
hi Search guifg=black guibg=yellow " Hide/Show menu and tool bar
hi Cursor guifg=white guibg=maroon function! ToggleGUICruft()
if &guioptions=='iaA'
exec('set guioptions=imTrLaA')
else
exec('set guioptions=iaA')
endif
endfunction
map <F11> <Esc>:call ToggleGUICruft()<cr>
" GUI default:
" - 'i' : Hide gui menus
" - 'aA' : Modal and modeless autoselect copy to yank buffer
set guioptions=iaA
else else
set background=dark set background=dark
endif endif
" check to make sure vim has been compiled with colorcolumn support
" before enabling it
if exists("+colorcolumn")
set colorcolumn=120
endif
colorscheme molokai-dark colorscheme molokai-dark
set norelativenumber set norelativenumber
set number set number
@ -90,9 +119,11 @@
set visualbell t_vb= set visualbell t_vb=
set cindent set cindent
set noautoindent set noautoindent
set tabstop=2 set tabstop=4
set shiftwidth=2 set softtabstop=4
set scrolloff=10 set shiftwidth=4
set cmdheight=2
set scrolloff=5
set expandtab set expandtab
set showmatch set showmatch
set cursorline set cursorline
@ -100,6 +131,7 @@
set showmode set showmode
set hlsearch set hlsearch
set incsearch set incsearch
set ignorecase
set wildmenu set wildmenu
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all. set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all.
set backspace=indent,eol,start set backspace=indent,eol,start
@ -107,19 +139,16 @@
set ruler set ruler
set hid set hid
set viminfo='20,\"50 set viminfo='20,\"50
set backspace=2 whichwrap+=<,>,h,l
set cmdheight=2
set smartcase set smartcase
set magic set magic
set showmode set showmode
let g:spf13_no_autochdir=1 set autochdir
set backspace=indent,eol,start
set list set list
set listchars=tab:\ ,trail:•,extends:#,nbsp:. " Highlight problematic whitespace set listchars=tab:\ ,trail:•,extends:#,nbsp:. " Highlight problematic whitespace
" Directories {{{ " Directories {{{
set backup " backups are nice ... set backup " backups are nice ...
set backupdir=$HOME/.vimbackup// " but not when they clog . set backupdir=$HOME/.vimbackup// " but not when they clog .
set directory=$HOME/.vimswap// " Same for swap files set directory=$HOME/.vimswap// " Same for swap files
@ -131,6 +160,7 @@
silent execute '!mkdir -p $HOME/.vimviews' silent execute '!mkdir -p $HOME/.vimviews'
au BufWinLeave \* silent! mkview "make vim save view (state) (fds, cursor, etc) au BufWinLeave \* silent! mkview "make vim save view (state) (fds, cursor, etc)
au BufWinEnter \* silent! loadview "make vim load view (state) (fds, cursor, etc) au BufWinEnter \* silent! loadview "make vim load view (state) (fds, cursor, etc)
" }}} " }}}
" }}} " }}}
@ -141,13 +171,13 @@
map <leader>e :NERDTreeFind<CR> map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR> nmap <leader>nt :NERDTreeFind<CR>
let NERDTreeShowBookmarks=1 let g:NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$'] let g:NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let NERDTreeChDirMode=0 let g:NERDTreeChDirMode=1
let NERDTreeQuitOnOpen=1 let g:NERDTreeQuitOnOpen=1
let NERDTreeMouseMode=2 let g:NERDTreeMouseMode=2
let NERDTreeShowHidden=1 let g:NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1 let g:NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0 let g:nerdtree_tabs_open_on_gui_startup=0
endif endif
@ -184,6 +214,10 @@
nnoremap <C-Z> :bnext <CR> nnoremap <C-Z> :bnext <CR>
" Visual mode: Keep selection after indent
vnoremap < <gv
vnoremap > >gv
if has("nvim") if has("nvim")
nnoremap <C-Space> za nnoremap <C-Space> za
elseif has("gui_running") elseif has("gui_running")
@ -201,7 +235,23 @@
nnoremap <C-S-F3> :%s/\s\+$//g<CR>:noh<CR> nnoremap <C-S-F3> :%s/\s\+$//g<CR>:noh<CR>
" }}} " }}}
" Highlights {{{
"
" Highlight coloring I prefer
highlight Search guibg=yellow guifg=black
highlight Cursor guifg=white guibg=red
highlight iCursor guifg=white guibg=red
" }}}
"
" File associations {{{
au! BufRead,BufNewFile *_iosf_trk.out set filetype=iosftrk
au! BufRead,BufNewFile *_iosfsb_trk.out set filetype=iosfsbtrk
au! BufRead,BufNewFile * RainbowToggleOn
" }}}
"
" }}} " }}}
" vim: foldenable foldmethod=marker " vim: foldenable foldmethod=marker