1
0
Fork 0
mirror of synced 2024-06-26 02:31:09 -04:00
This commit is contained in:
Vignesh D 2017-01-14 04:46:50 +00:00 committed by GitHub
commit 0437c6746d
15 changed files with 200 additions and 8 deletions

2
.gitignore vendored
View file

@ -4,6 +4,6 @@ temp_dirs/yankring_history_v2.txt
sources_forked/yankring/doc/tags sources_forked/yankring/doc/tags
sources_non_forked/tlib/doc/tags sources_non_forked/tlib/doc/tags
sources_non_forked/ctrlp.vim/doc/tags* sources_non_forked/ctrlp.vim/doc/tags*
my_configs.vim
tags tags
.DS_Store .DS_Store
.idea/*

View file

@ -12,7 +12,7 @@ I would of course recommend using the awesome version.c
## How to install the Awesome version? ## 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: 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 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 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. 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 sh ~/.vim_runtime/install_basic_vimrc.sh

Binary file not shown.

181
my_configs.vim Executable file
View file

@ -0,0 +1,181 @@
set cmdheight=1
nmap <leader>q :q<cr>
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 <C-n> :NERDTreeToggle<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => 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 <leader>h :noh<CR>
set clipboard=unnamed
if !has('nvim')
set clipboard+=unnamedplus
endif
let g:syntastic_c_config_file = 'syntastic_c_config'

@ -0,0 +1 @@
Subproject commit 057f6150bdb11124bcb63e85f5445fae47f383c3

@ -0,0 +1 @@
Subproject commit 1d9e187e76e71466deb14b8b1c546f64f8090a63

@ -0,0 +1 @@
Subproject commit f7ccee54743800ef2aab264dafeed3d5a4ec1fbd

@ -1 +1 @@
Subproject commit 28a989b28457e38df620e4c7ab23e224aff70efe Subproject commit b8dff40f69f1873effbed97c759a8452ecb240ed

@ -0,0 +1 @@
Subproject commit 93387d7fba06f8ba7ee52dc00d08919f8a35341d

@ -0,0 +1 @@
Subproject commit 11632455de8caa40f264501df8f0a3e249cf0595

@ -0,0 +1 @@
Subproject commit fa5053105fe43bfa90b18052ad58a685c2313675

View file

@ -240,15 +240,18 @@ snippet fig figure environment (includegraphics)
\\end{figure} \\end{figure}
${0} ${0}
snippet tikz figure environment (tikzpicture) snippet tikz figure environment (tikzpicture)
\\begin{figure}[htpb] \\begin{figure}[htpb]
\\begin{center} \\begin{center}
\\begin{tikzpicture}[scale=${1:1}, transform shape] \\begin{tikzpicture}[scale=${1:1}, transform shape]
${2} ${2}
\\end{tikzpicture} \\end{tikzpicture}
\\end{center} \\end{center}
\\caption{${3}} \\caption{${3}}
\\label{fig:${4}} \\label{fig:${4}}
\\end{figure} \\end{figure}
${0} ${0}
snippet subfig subfigure environment snippet subfig subfigure environment
\\begin{subfigure}[${1}]{${2:\\textwidth}} \\begin{subfigure}[${1}]{${2:\\textwidth}}
@ -258,6 +261,7 @@ snippet subfig subfigure environment
\\caption{${4}} \\caption{${4}}
\\label{fig:${5}} \\label{fig:${5}}
\\end{subfigure} \\end{subfigure}
${0} ${0}
#math #math
snippet stackrel \stackrel{}{} snippet stackrel \stackrel{}{}

@ -0,0 +1 @@
Subproject commit e79d4c0c24c43d3ada283b1f5a1b8fa6cf820a70

View file

@ -225,10 +225,10 @@ map <c-space> ?
map <silent> <leader><cr> :noh<cr> map <silent> <leader><cr> :noh<cr>
" Smart way to move between windows " Smart way to move between windows
map <C-j> <C-W>j nnoremap <C-j> <C-W>j
map <C-k> <C-W>k nnoremap <C-k> <C-W>k
map <C-h> <C-W>h nnoremap <C-h> <C-W>h
map <C-l> <C-W>l nnoremap <C-l> <C-W>l
" Close the current buffer " Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cr>gT map <leader>bd :Bclose<cr>:tabclose<cr>gT