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
"
" This uses Vundle for package management, so following (from Vundle README)
" must be run for rest of this vimrc to work:
" This uses Vundle for package management, so Vundle is installed on the first
" run.
"
" % mkdir -p ~/.vim/bundle
" % git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
"
" Then run the following to install plugins
" Run the following to install plugins:
"
" * Launch vim and run :PluginInstall
" * 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 {{{
set nocompatible " be iMproved, required
@ -30,7 +36,7 @@
" Vundle setup - Preamble {{{
set rtp+=~/.vim/bundle/Vundle.vim
set runtimepath+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
@ -41,6 +47,8 @@
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'mhinz/vim-signify'
Plugin 'tmhedberg/matchit'
Plugin 'spf13/vim-colors'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-repeat'
@ -52,6 +60,7 @@
Plugin 'pR0Ps/molokai-dark'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'luochen1990/rainbow'
Plugin 'vhda/verilog_systemverilog.vim'
" }}}
@ -72,17 +81,37 @@
elseif has("win32")
set guifont=Iosevka\ Term\ Regular\ 13
else
set guifont=Iosevka\ Term\ Regular\ 13
set guifont=Iosevka\ Term\ Regular\ 13.5
end
set columns=120 lines=54
hi Search guifg=black guibg=yellow
hi Cursor guifg=white guibg=maroon
" Hide/Show menu and tool bar
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
set background=dark
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
set norelativenumber
set number
@ -90,9 +119,11 @@
set visualbell t_vb=
set cindent
set noautoindent
set tabstop=2
set shiftwidth=2
set scrolloff=10
set tabstop=4
set softtabstop=4
set shiftwidth=4
set cmdheight=2
set scrolloff=5
set expandtab
set showmatch
set cursorline
@ -100,6 +131,7 @@
set showmode
set hlsearch
set incsearch
set ignorecase
set wildmenu
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all.
set backspace=indent,eol,start
@ -107,19 +139,16 @@
set ruler
set hid
set viminfo='20,\"50
set backspace=2 whichwrap+=<,>,h,l
set cmdheight=2
set smartcase
set magic
set showmode
let g:spf13_no_autochdir=1
set backspace=indent,eol,start
set autochdir
set list
set listchars=tab:\ ,trail:•,extends:#,nbsp:. " Highlight problematic whitespace
" Directories {{{
set backup " backups are nice ...
set backupdir=$HOME/.vimbackup// " but not when they clog .
set directory=$HOME/.vimswap// " Same for swap files
@ -131,24 +160,25 @@
silent execute '!mkdir -p $HOME/.vimviews'
au BufWinLeave \* silent! mkview "make vim save view (state) (fds, cursor, etc)
au BufWinEnter \* silent! loadview "make vim load view (state) (fds, cursor, etc)
" }}}
" }}}
" }}}
" Module customization {{{
if isdirectory(expand("~/.vim/bundle/nerdtree"))
map <C-e> <plug>NERDTreeTabsToggle<CR>
map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR>
map <C-e> <plug>NERDTreeTabsToggle<CR>
map <leader>e :NERDTreeFind<CR>
nmap <leader>nt :NERDTreeFind<CR>
let NERDTreeShowBookmarks=1
let NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let NERDTreeChDirMode=0
let NERDTreeQuitOnOpen=1
let NERDTreeMouseMode=2
let NERDTreeShowHidden=1
let NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0
let g:NERDTreeShowBookmarks=1
let g:NERDTreeIgnore=['\.py[cd]$', '\~$', '\.swo$', '\.swp$', '^\.git$', '^\.hg$', '^\.svn$', '\.bzr$']
let g:NERDTreeChDirMode=1
let g:NERDTreeQuitOnOpen=1
let g:NERDTreeMouseMode=2
let g:NERDTreeShowHidden=1
let g:NERDTreeKeepTreeInNewTab=1
let g:nerdtree_tabs_open_on_gui_startup=0
endif
let g:airline#extensions#tabline#enabled = 1
@ -184,6 +214,10 @@
nnoremap <C-Z> :bnext <CR>
" Visual mode: Keep selection after indent
vnoremap < <gv
vnoremap > >gv
if has("nvim")
nnoremap <C-Space> za
elseif has("gui_running")
@ -201,7 +235,23 @@
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