diff --git a/.gitignore b/.gitignore index 56dee29f..a728c9c9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,6 @@ temp_dirs/yankring_history_v2.txt sources_forked/yankring/doc/tags sources_non_forked/tlib/doc/tags sources_non_forked/ctrlp.vim/doc/tags* -my_configs.vim tags .DS_Store +.idea/* diff --git a/README.md b/README.md index 489ec5f9..f83a62f2 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ I would of course recommend using the awesome version.c ## How to install the Awesome version? The awesome version includes a lot of great plugins, configurations and color schemes that make Vim a lot better. To install it simply do following: - git clone https://github.com/amix/vimrc.git ~/.vim_runtime + git clone https://github.com/vignesh0025/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_awesome_vimrc.sh I also recommend using [Source Code Pro font from Adobe](http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage&code=1960) (it's free and awesome font for writing and programming). The Awesome vimrc is already setup to try to use it @@ -22,7 +22,7 @@ The basic version is basically just one file and no plugins. You can check out [ This is useful to install on remote servers where you don't need many plugins and you don't do many edits. - git clone git://github.com/amix/vimrc.git ~/.vim_runtime + git clone git://github.com/vignesh0025/vimrc.git ~/.vim_runtime sh ~/.vim_runtime/install_basic_vimrc.sh diff --git a/Sauce Code Powerline Medium.otf b/Sauce Code Powerline Medium.otf new file mode 100644 index 00000000..9b8be219 Binary files /dev/null and b/Sauce Code Powerline Medium.otf differ diff --git a/my_configs.vim b/my_configs.vim new file mode 100755 index 00000000..081f92a3 --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,181 @@ +set cmdheight=1 +nmap q :q + +if has("mac") || has("macunix") + set gfn=Hack:h14,Source\ Code\ Pro:h15,Menlo:h15 +elseif has("win16") || has("win32") + set gfn=Source_Code_Pro_Medium:h12,Bitstream\ Vera\ Sans\ Mono:h11 +elseif has("gui_gtk2") + set gfn=SauceCodePro\ Nerd\ Font\ Medium\ 11 +elseif has("linux") + set gfn=SauceCodePro\ Nerd\ Font\ Medium\ 11 +elseif has("unix") + set gfn=Monospace\ 11 +endif + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Nerd Tree Config +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif +map :NERDTreeToggle + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Syntastic +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:syntastic_asm_checkers = ['nasm'] + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Airline Theme +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:airline_theme='molokai' +let g:airline_powerline_fonts = 1 + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => vim-color-solarised +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if has("mac") || has("macunix") + let g:solarized_termcolors=256 +endif + +syntax enable +set background=dark +colorscheme solarized + +let g:lightline = { + \ 'colorscheme': 'landscape', + \ 'active': { + \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], ['ctrlpmark'] ], + \ 'right': [ [ 'syntastic', 'lineinfo' ], ['percent'], [ 'fileformat', 'fileencoding', 'filetype' ] ] + \ }, + \ 'component_function': { + \ 'fugitive': 'LightlineFugitive', + \ 'filename': 'LightlineFilename', + \ 'fileformat': 'LightlineFileformat', + \ 'filetype': 'LightlineFiletype', + \ 'fileencoding': 'LightlineFileencoding', + \ 'mode': 'LightlineMode', + \ 'ctrlpmark': 'CtrlPMark', + \ }, + \ 'component_expand': { + \ 'syntastic': 'SyntasticStatuslineFlag', + \ }, + \ 'component_type': { + \ 'syntastic': 'error', + \ }, + \ 'separator': { 'left': '', 'right': '' }, + \ 'subseparator': { 'left': '\ue0b1', 'right': '\ue0b3' } + \ } + +function! LightlineModified() + return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' +endfunction + +function! LightlineReadonly() + return &ft !~? 'help' && &readonly ? '' : '' +endfunction + +function! LightlineFilename() + let fname = expand('%:t') + return fname == 'ControlP' && has_key(g:lightline, 'ctrlp_item') ? g:lightline.ctrlp_item : + \ fname == '__Tagbar__' ? g:lightline.fname : + \ fname =~ '__Gundo\|NERD_tree' ? '' : + \ &ft == 'vimfiler' ? vimfiler#get_status_string() : + \ &ft == 'unite' ? unite#get_status_string() : + \ &ft == 'vimshell' ? vimshell#get_status_string() : + \ ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . + \ ('' != fname ? fname : '[No Name]') . + \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') +endfunction + +function! LightlineFugitive() + try + if expand('%:t') !~? 'Tagbar\|Gundo\|NERD' && &ft !~? 'vimfiler' && exists('*fugitive#head') + let mark = '' " edit here for cool mark + let branch = fugitive#head() + return branch !=# '' ? mark.branch : '' + endif + catch + endtry + return '' +endfunction + +function! LightlineFileformat() + return winwidth(0) > 70 ? &fileformat : '' +endfunction + +function! LightlineFiletype() + return winwidth(0) > 70 ? (&filetype !=# '' ? &filetype : 'no ft') : '' +endfunction + +function! LightlineFileencoding() + return winwidth(0) > 70 ? (&fenc !=# '' ? &fenc : &enc) : '' +endfunction + +function! LightlineMode() + let fname = expand('%:t') + return fname == '__Tagbar__' ? 'Tagbar' : + \ fname == 'ControlP' ? 'CtrlP' : + \ fname == '__Gundo__' ? 'Gundo' : + \ fname == '__Gundo_Preview__' ? 'Gundo Preview' : + \ fname =~ 'NERD_tree' ? 'NERDTree' : + \ &ft == 'unite' ? 'Unite' : + \ &ft == 'vimfiler' ? 'VimFiler' : + \ &ft == 'vimshell' ? 'VimShell' : + \ winwidth(0) > 60 ? lightline#mode() : '' +endfunction + +function! CtrlPMark() + if expand('%:t') =~ 'ControlP' && has_key(g:lightline, 'ctrlp_item') + call lightline#link('iR'[g:lightline.ctrlp_regex]) + return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item + \ , g:lightline.ctrlp_next], 0) + else + return '' + endif +endfunction + +let g:ctrlp_status_func = { + \ 'main': 'CtrlPStatusFunc_1', + \ 'prog': 'CtrlPStatusFunc_2', + \ } + +function! CtrlPStatusFunc_1(focus, byfname, regex, prev, item, next, marked) + let g:lightline.ctrlp_regex = a:regex + let g:lightline.ctrlp_prev = a:prev + let g:lightline.ctrlp_item = a:item + let g:lightline.ctrlp_next = a:next + return lightline#statusline(0) +endfunction + +function! CtrlPStatusFunc_2(str) + return lightline#statusline(0) +endfunction + +let g:tagbar_status_func = 'TagbarStatusFunc' + +function! TagbarStatusFunc(current, sort, fname, ...) abort + let g:lightline.fname = a:fname + return lightline#statusline(0) +endfunction + +augroup AutoSyntastic + autocmd! + autocmd BufWritePost *.c,*.cpp call s:syntastic() +augroup END +function! s:syntastic() + SyntasticCheck + call lightline#update() +endfunction + +let g:unite_force_overwrite_statusline = 0 +let g:vimfiler_force_overwrite_statusline = 0 +let g:vimshell_force_overwrite_statusline = 0 +map h :noh + +set clipboard=unnamed + +if !has('nvim') + set clipboard+=unnamedplus +endif + +let g:syntastic_c_config_file = 'syntastic_c_config' diff --git a/sources_non_forked/nerdcommenter b/sources_non_forked/nerdcommenter new file mode 160000 index 00000000..057f6150 --- /dev/null +++ b/sources_non_forked/nerdcommenter @@ -0,0 +1 @@ +Subproject commit 057f6150bdb11124bcb63e85f5445fae47f383c3 diff --git a/sources_non_forked/nerdtree-git-plugin b/sources_non_forked/nerdtree-git-plugin new file mode 160000 index 00000000..1d9e187e --- /dev/null +++ b/sources_non_forked/nerdtree-git-plugin @@ -0,0 +1 @@ +Subproject commit 1d9e187e76e71466deb14b8b1c546f64f8090a63 diff --git a/sources_non_forked/python-mode b/sources_non_forked/python-mode new file mode 160000 index 00000000..f7ccee54 --- /dev/null +++ b/sources_non_forked/python-mode @@ -0,0 +1 @@ +Subproject commit f7ccee54743800ef2aab264dafeed3d5a4ec1fbd diff --git a/sources_non_forked/vim-colorschemes b/sources_non_forked/vim-colorschemes index 28a989b2..b8dff40f 160000 --- a/sources_non_forked/vim-colorschemes +++ b/sources_non_forked/vim-colorschemes @@ -1 +1 @@ -Subproject commit 28a989b28457e38df620e4c7ab23e224aff70efe +Subproject commit b8dff40f69f1873effbed97c759a8452ecb240ed diff --git a/sources_non_forked/vim-devicons b/sources_non_forked/vim-devicons new file mode 160000 index 00000000..93387d7f --- /dev/null +++ b/sources_non_forked/vim-devicons @@ -0,0 +1 @@ +Subproject commit 93387d7fba06f8ba7ee52dc00d08919f8a35341d diff --git a/sources_non_forked/vim-easymotion b/sources_non_forked/vim-easymotion new file mode 160000 index 00000000..11632455 --- /dev/null +++ b/sources_non_forked/vim-easymotion @@ -0,0 +1 @@ +Subproject commit 11632455de8caa40f264501df8f0a3e249cf0595 diff --git a/sources_non_forked/vim-signify b/sources_non_forked/vim-signify new file mode 160000 index 00000000..fa505310 --- /dev/null +++ b/sources_non_forked/vim-signify @@ -0,0 +1 @@ +Subproject commit fa5053105fe43bfa90b18052ad58a685c2313675 diff --git a/sources_non_forked/vim-snipmate/doc/snipMate.txt b/sources_non_forked/vim-snipmate/doc/SnipMate.txt similarity index 100% rename from sources_non_forked/vim-snipmate/doc/snipMate.txt rename to sources_non_forked/vim-snipmate/doc/SnipMate.txt diff --git a/sources_non_forked/vim-snippets/snippets/tex.snippets b/sources_non_forked/vim-snippets/snippets/tex.snippets index 05ec852c..1ea10684 100644 --- a/sources_non_forked/vim-snippets/snippets/tex.snippets +++ b/sources_non_forked/vim-snippets/snippets/tex.snippets @@ -240,15 +240,18 @@ snippet fig figure environment (includegraphics) \\end{figure} ${0} snippet tikz figure environment (tikzpicture) + \\begin{figure}[htpb] \\begin{center} \\begin{tikzpicture}[scale=${1:1}, transform shape] + ${2} \\end{tikzpicture} \\end{center} \\caption{${3}} \\label{fig:${4}} \\end{figure} + ${0} snippet subfig subfigure environment \\begin{subfigure}[${1}]{${2:\\textwidth}} @@ -258,6 +261,7 @@ snippet subfig subfigure environment \\caption{${4}} \\label{fig:${5}} \\end{subfigure} + ${0} #math snippet stackrel \stackrel{}{} diff --git a/sources_non_forked/vim-tmux-navigator b/sources_non_forked/vim-tmux-navigator new file mode 160000 index 00000000..e79d4c0c --- /dev/null +++ b/sources_non_forked/vim-tmux-navigator @@ -0,0 +1 @@ +Subproject commit e79d4c0c24c43d3ada283b1f5a1b8fa6cf820a70 diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 6c1d423c..de12f208 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -225,10 +225,10 @@ map ? map :noh " Smart way to move between windows -map j -map k -map h -map l +nnoremap j +nnoremap k +nnoremap h +nnoremap l " Close the current buffer map bd :Bclose:tabclosegT