Skip to content

Instantly share code, notes, and snippets.

@rxw1
Last active September 11, 2020 23:15
Show Gist options
  • Save rxw1/6fba17fc6974e181752f452eea898b60 to your computer and use it in GitHub Desktop.
Save rxw1/6fba17fc6974e181752f452eea898b60 to your computer and use it in GitHub Desktop.
" vimrc
" [email protected]
" Sat Sep 12 01:04:02 AM CEST 2020
let g:tex_flavor = "latex"
call plug#begin() " {{{
" Completion
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'mattn/emmet-vim'
Plug 'Shougo/echodoc.vim'
" Fuzzy Finder
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
" Colorschemes
Plug 'chriskempson/base16-vim'
Plug 'xolox/vim-colorscheme-switcher'
" UI
Plug 'itchyny/lightline.vim'
Plug 'kshenoy/vim-signature'
Plug 'majutsushi/tagbar'
Plug 'mhinz/vim-signify'
Plug 'mhinz/vim-startify'
" Misc
Plug 'pbrisbin/vim-mkdir'
Plug 'xolox/vim-misc'
Plug 'mhinz/vim-rfc'
" Writing
Plug 'chrisbra/Colorizer'
Plug 'dbmrq/vim-ditto'
Plug 'lervag/vimtex'
Plug 'reedes/vim-colors-pencil'
Plug 'reedes/vim-pencil'
" Web Development
Plug 'leafOfTree/vim-svelte-plugin'
if executable('sxhkd')
Plug 'kovetskiy/sxhkd-vim'
endif
if executable('rustc')
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
Plug 'racer-rust/vim-racer', { 'for': 'rust' }
endif
call plug#end() " }}}
set termguicolors
colorscheme base16-gruvbox-dark-hard
highlight clear LineNr
highlight clear SignColumn
highlight clear CursorLineNr
highlight clear SignifySignAdd
highlight clear SignifySignChange
highlight clear SignifySignDelete
highlight clear SignatureMarkText
highlight Error guifg=#ff0022
highlight LineNr guifg=#555555
highlight CursorLine guibg=#2B2620
highlight CursorLineNr guifg=#ffffff
highlight Folded guifg=#eeeeee guibg=none
highlight Search guifg=#00cc99 guibg=none
highlight SignifySignAdd guifg=#00cc99
highlight SignifySignChange guifg=#00cc00
highlight SignifySignDelete guifg=#cc00cc
highlight SignatureMarkText guifg=#eeeeee
if $TERM =~'linux'
elseif $TERM =~'st-256color'
elseif $TERM =~'screen-256color'
endif
set noautoindent " default on
set noexpandtab " default off
set softtabstop=2 " default 0
set shiftround " default off
set shiftwidth=2 " default 8
set smarttab " default on
set tabstop=2 " default 8
set fillchars=fold:\
set title " default off
set number " default off
set foldmarker=\ {{{,\ }}}
set autochdir " default off
set noshowmode " default on
set cursorline " default off
set titlelen=80 " default 85
set mouse=a " default nothing
set ttimeoutlen=10 " default 50
set relativenumber " default off
set timeoutlen=1000 " default 1000
set foldmethod=marker " default manual
set titlestring="%<%F%=%l\ %L-%P" " default nothing
function! PlugFresh()
:PlugUpgrade
:PlugInstall
:PlugUpdate
:PlugClean
endfunction
let mapleader='\'
" Sort lines by length
try
map <Leader>ol :!perl -e 'print sort { length($a) <=> length($b) } <>'<CR>
map <Leader>Ol :!perl -e 'print sort { length($b) <=> length($a) } <>'<CR>
endtry
" Jump to prev/next error/warning
try
nnoremap<Leader>' :Tagbar<CR>
nnoremap<Leader>, :source %<CR>
nnoremap<Leader>. :source ~/.config/nvim/init.vim<CR>
nnoremap<Leader>C :ColorToggle<CR>
nnoremap<Leader>P :exec PlugFresh()<CR>
nnoremap<Leader>f :Files<cr>
nnoremap<Leader>y "*Y
nnoremap<Leader>z :%!tr -s " " \| sed 's/ /\t/' \| column -t -s $'\t' \| sort -d<CR>
nnoremap<silent> <C-L> :noh<CR><C-L>
nnoremap<silent> [c :call CocAction('diagnosticNext')<cr>
nnoremap<silent> ]c :call CocAction('diagnosticPrevious')<cr>
endtry
for f in split(glob('~/.config/nvim/config.d/*.vim'), '\n')
exe 'source' f
endfor
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'filename' ],
\ [ 'readonly', 'percent', 'modified', 'charvaluehex' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component': {
\ 'charvaluehex': '0x%B'
\ },
\ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment