|
|
@ -1,3 +1,4 @@ |
|
|
|
"==plugins-start |
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
" => Plug |
|
|
|
"""""""""""""""""""""""""""" |
|
|
@ -19,6 +20,83 @@ Plug 'https://github.com/tpope/vim-fugitive' |
|
|
|
Plug 'https://github.com/vim-scripts/ReplaceWithRegister' |
|
|
|
call plug#end() |
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
" => Plugins |
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
|
|
|
|
" FZF |
|
|
|
command! -bang -nargs=? -complete=dir Files |
|
|
|
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0) |
|
|
|
map <leader>ff :Files<CR> |
|
|
|
map <leader>fm :Marks<CR> |
|
|
|
map <leader>fw :Windows<CR> |
|
|
|
map <leader>fb :Buffers<CR> |
|
|
|
map <leader>fh :History<CR> |
|
|
|
map <leader>fg :Tags<CR> |
|
|
|
map <leader>ft :BTags<CR> |
|
|
|
|
|
|
|
" goyo |
|
|
|
let g:goyo_width=100 |
|
|
|
let g:goyo_margin_top=2 |
|
|
|
let g:goyo_margin_bottom=2 |
|
|
|
nnoremap <silent> <leader>z :Goyo<CR> |
|
|
|
|
|
|
|
" lightline |
|
|
|
let g:lightline = { |
|
|
|
\ 'colorscheme': 'quantum', |
|
|
|
\ 'active': { |
|
|
|
\ 'left': [ ['mode', 'paste'], |
|
|
|
\ ['fugitive', 'readonly', 'filename', 'modified'] ], |
|
|
|
\ 'right': [ [ 'lineinfo' ], ['percent'] ] |
|
|
|
\ }, |
|
|
|
\ 'component': { |
|
|
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}', |
|
|
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', |
|
|
|
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' |
|
|
|
\ }, |
|
|
|
\ 'component_visible_condition': { |
|
|
|
\ 'readonly': '(&filetype!="help"&& &readonly)', |
|
|
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', |
|
|
|
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' |
|
|
|
\ }, |
|
|
|
\ 'separator': { 'left': ' ', 'right': ' ' }, |
|
|
|
\ 'subseparator': { 'left': ' ', 'right': ' ' } |
|
|
|
\ } |
|
|
|
|
|
|
|
" gitgutter |
|
|
|
let g:gitgutter_enabled = 0 |
|
|
|
map <leader>d :GitGutterToggle<CR> |
|
|
|
|
|
|
|
" julia |
|
|
|
let g:latex_to_unicode_auto = 1 |
|
|
|
let g:default_julia_version = "1.0" |
|
|
|
|
|
|
|
" netrw |
|
|
|
let g:netrw_banner = 0 |
|
|
|
let g:netrw_liststyle = 3 |
|
|
|
let g:netrw_browse_split = 4 |
|
|
|
let g:netrw_altv = 1 |
|
|
|
let g:netrw_winsize = 20 |
|
|
|
map <leader>nn :call ToggleNetrw()<CR> |
|
|
|
let g:NetrwIsOpen=0 |
|
|
|
function! ToggleNetrw() abort |
|
|
|
if g:NetrwIsOpen |
|
|
|
let i = bufnr("$") |
|
|
|
while (i >= 1) |
|
|
|
if (getbufvar(i, "&filetype") == "netrw") |
|
|
|
silent exe "bwipeout " . i |
|
|
|
endif |
|
|
|
let i-=1 |
|
|
|
endwhile |
|
|
|
let g:NetrwIsOpen=0 |
|
|
|
else |
|
|
|
let g:NetrwIsOpen=1 |
|
|
|
silent Vexplore |
|
|
|
endif |
|
|
|
endfunction |
|
|
|
|
|
|
|
"==plugins-end |
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
" => General |
|
|
|
"""""""""""""""""""""""""""" |
|
|
@ -117,82 +195,6 @@ function! HasPaste() abort |
|
|
|
return '' |
|
|
|
endfunction |
|
|
|
|
|
|
|
|
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
" => Plugins |
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
|
|
|
|
" FZF |
|
|
|
command! -bang -nargs=? -complete=dir Files |
|
|
|
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0) |
|
|
|
map <leader>ff :Files<CR> |
|
|
|
map <leader>fm :Marks<CR> |
|
|
|
map <leader>fw :Windows<CR> |
|
|
|
map <leader>fb :Buffers<CR> |
|
|
|
map <leader>fh :History<CR> |
|
|
|
map <leader>fg :Tags<CR> |
|
|
|
map <leader>ft :BTags<CR> |
|
|
|
|
|
|
|
" goyo |
|
|
|
let g:goyo_width=100 |
|
|
|
let g:goyo_margin_top=2 |
|
|
|
let g:goyo_margin_bottom=2 |
|
|
|
nnoremap <silent> <leader>z :Goyo<CR> |
|
|
|
|
|
|
|
" lightline |
|
|
|
let g:lightline = { |
|
|
|
\ 'colorscheme': 'quantum', |
|
|
|
\ 'active': { |
|
|
|
\ 'left': [ ['mode', 'paste'], |
|
|
|
\ ['fugitive', 'readonly', 'filename', 'modified'] ], |
|
|
|
\ 'right': [ [ 'lineinfo' ], ['percent'] ] |
|
|
|
\ }, |
|
|
|
\ 'component': { |
|
|
|
\ 'readonly': '%{&filetype=="help"?"":&readonly?"🔒":""}', |
|
|
|
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}', |
|
|
|
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}' |
|
|
|
\ }, |
|
|
|
\ 'component_visible_condition': { |
|
|
|
\ 'readonly': '(&filetype!="help"&& &readonly)', |
|
|
|
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))', |
|
|
|
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())' |
|
|
|
\ }, |
|
|
|
\ 'separator': { 'left': ' ', 'right': ' ' }, |
|
|
|
\ 'subseparator': { 'left': ' ', 'right': ' ' } |
|
|
|
\ } |
|
|
|
|
|
|
|
" gitgutter |
|
|
|
let g:gitgutter_enabled = 0 |
|
|
|
map <leader>d :GitGutterToggle<CR> |
|
|
|
|
|
|
|
" julia |
|
|
|
let g:latex_to_unicode_auto = 1 |
|
|
|
let g:default_julia_version = "1.0" |
|
|
|
|
|
|
|
" netrw |
|
|
|
let g:netrw_banner = 0 |
|
|
|
let g:netrw_liststyle = 3 |
|
|
|
let g:netrw_browse_split = 4 |
|
|
|
let g:netrw_altv = 1 |
|
|
|
let g:netrw_winsize = 20 |
|
|
|
map <leader>nn :call ToggleNetrw()<CR> |
|
|
|
let g:NetrwIsOpen=0 |
|
|
|
function! ToggleNetrw() abort |
|
|
|
if g:NetrwIsOpen |
|
|
|
let i = bufnr("$") |
|
|
|
while (i >= 1) |
|
|
|
if (getbufvar(i, "&filetype") == "netrw") |
|
|
|
silent exe "bwipeout " . i |
|
|
|
endif |
|
|
|
let i-=1 |
|
|
|
endwhile |
|
|
|
let g:NetrwIsOpen=0 |
|
|
|
else |
|
|
|
let g:NetrwIsOpen=1 |
|
|
|
silent Vexplore |
|
|
|
endif |
|
|
|
endfunction |
|
|
|
|
|
|
|
"""""""""""""""""""""""""""" |
|
|
|
" => Remaps |
|
|
|
"""""""""""""""""""""""""""" |
|
|
|