Vim: Go noir
This commit is contained in:
75
.vim/vimrc
75
.vim/vimrc
@@ -48,7 +48,7 @@ Plugin 'honza/vim-snippets'
|
||||
Plugin 'wellle/context.vim'
|
||||
Plugin 'svermeulen/vim-yoink'
|
||||
Plugin 'will133/vim-dirdiff'
|
||||
Plugin 'n0v1c3/vira'
|
||||
"Plugin 'n0v1c3/vira'
|
||||
" }}}
|
||||
|
||||
" Files switch, jump and grep-like tools {{{
|
||||
@@ -77,6 +77,7 @@ Plugin 'kergoth/vim-bitbake' " Bitbake templates and syntax
|
||||
"Plugin 'vim-scripts/DoxygenToolkit.vim' " Doxygen support
|
||||
Plugin 'pboettch/vim-cmake-syntax'
|
||||
Plugin 'aklt/plantuml-syntax'
|
||||
Plugin 'vim-pandoc/vim-pandoc-syntax'
|
||||
" }}}
|
||||
|
||||
" Colorschemes {{{
|
||||
@@ -84,7 +85,12 @@ Plugin 'aklt/plantuml-syntax'
|
||||
"Plugin 'jeaye/color_coded'
|
||||
"Plugin 'thiagoalessio/rainbow_levels.vim'
|
||||
"Plugin 'fielding/vice'
|
||||
Plugin 'whatyouhide/vim-gotham'
|
||||
"Plugin 'whatyouhide/vim-gotham'
|
||||
"Plugin 'chuling/ci_dark'
|
||||
"Plugin 'adrian5/oceanic-next-vim'
|
||||
"Black and white:
|
||||
"Plugin 'ewilazarus/preto'
|
||||
Plugin 'andreasvc/vim-256noir.git'
|
||||
" }}}
|
||||
|
||||
" Other plugins (external tools, etc) {{{
|
||||
@@ -93,7 +99,9 @@ Plugin 'jez/vim-superman' "vman application
|
||||
Plugin 'vimwiki/vimwiki'
|
||||
"Plugin 'metakirby5/codi.vim' " live coding
|
||||
Plugin 'vim-airline/vim-airline'
|
||||
Plugin 'vim-airline/vim-airline-themes'
|
||||
Plugin 'mhinz/vim-startify'
|
||||
Plugin 'vim-pandoc/vim-pandoc'
|
||||
" }}}
|
||||
|
||||
call vundle#end() " required
|
||||
@@ -123,9 +131,9 @@ set autoindent
|
||||
set cino=l1,:0
|
||||
set showmode
|
||||
set showcmd
|
||||
" do not force write on buffer switch
|
||||
" do not force write on buffer switch
|
||||
set hidden
|
||||
"set visualbell
|
||||
" set visualbell
|
||||
set nowrapscan
|
||||
|
||||
set cursorline
|
||||
@@ -138,10 +146,10 @@ set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
|
||||
set laststatus=2
|
||||
" Vista configuration
|
||||
function! NearestMethodOrFunction() abort
|
||||
return get(b:, 'vista_nearest_method_or_function', '')
|
||||
return get(b:, 'vista_nearest_method_or_function', '')
|
||||
endfunction
|
||||
|
||||
set statusline+=\
|
||||
set statusline+=\ "comment to remove trailing space
|
||||
set statusline+=%{NearestMethodOrFunction()}
|
||||
" }}}
|
||||
set number
|
||||
@@ -334,8 +342,8 @@ match Error /\s\+$\|DU\cPA/
|
||||
|
||||
" Removing scrollbars
|
||||
if !has("gui_running")
|
||||
colorscheme gotham256
|
||||
set background=dark
|
||||
colorscheme 256_noir
|
||||
" To show special characters in Vim
|
||||
set listchars=tab:▸\ ,trail:¬
|
||||
set list
|
||||
@@ -363,28 +371,28 @@ let g:miniBufExplStatusLineText = ''
|
||||
|
||||
" autocmd {{{
|
||||
if has("autocmd")
|
||||
"restore cursor position
|
||||
autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
|
||||
autocmd FileType helpfile set nonumber
|
||||
"restore cursor position
|
||||
autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
|
||||
autocmd FileType helpfile set nonumber
|
||||
|
||||
autocmd WinLeave * set nocursorline
|
||||
autocmd WinEnter * set cursorline
|
||||
autocmd WinLeave * set nocursorline
|
||||
autocmd WinEnter * set cursorline
|
||||
|
||||
" Set vim to save the file on focus out
|
||||
"au FocusLost * :wa
|
||||
" Set vim to save the file on focus out
|
||||
"au FocusLost * :wa
|
||||
|
||||
" Resize Split When the window is resized
|
||||
au VimResized * :wincmd =
|
||||
" Resize Split When the window is resized
|
||||
au VimResized * :wincmd =
|
||||
|
||||
" If you want to show the nearest function in your statusline automatically
|
||||
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
|
||||
" If you want to show the nearest function in your statusline automatically
|
||||
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" Folding {{{
|
||||
function! FoldFormat()
|
||||
let foldsize = (v:foldend - v:foldstart)
|
||||
return getline(v:foldstart)."\t\t\t(".foldsize."\tmore lines)"
|
||||
let foldsize = (v:foldend - v:foldstart)
|
||||
return getline(v:foldstart)."\t\t\t(".foldsize."\tmore lines)"
|
||||
endfunction
|
||||
set foldenable
|
||||
set foldlevelstart=999
|
||||
@@ -393,7 +401,7 @@ set foldtext=FoldFormat()
|
||||
set fillchars=fold:\ " comment just to remove trailing
|
||||
set foldmethod=syntax
|
||||
if has('folding')
|
||||
setglobal foldopen+=jump
|
||||
setglobal foldopen+=jump
|
||||
endif
|
||||
|
||||
" }}}
|
||||
@@ -435,16 +443,16 @@ set cmdheight=2
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
else
|
||||
call CocAction('doHover')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
@@ -453,3 +461,14 @@ autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
let g:vim_search_pulse_mode = 'pattern'
|
||||
let g:vim_search_pulse_duration = 400
|
||||
|
||||
"Taken from 256_noir readme:
|
||||
set cursorline
|
||||
highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
|
||||
autocmd InsertEnter * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=234 guifg=NONE guibg=#1c1c1c
|
||||
autocmd InsertLeave * highlight CursorLine cterm=NONE ctermfg=NONE ctermbg=233 guifg=NONE guibg=#121212
|
||||
|
||||
let g:airline_theme = 'minimalist'
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline_stl_path_style = 'short'
|
||||
let g:airline_highlighting_cache = 1
|
||||
|
||||
Reference in New Issue
Block a user