Compare commits

...

7 Commits

Author SHA1 Message Date
bretello 25eb757af3
vim: formatting in vimrc 2020-12-07 23:41:44 +01:00
bretello 56f0a4d6d4
vim: move ale definition to ale group 2020-12-07 23:41:44 +01:00
bretello 5241e825d2
vim: replace lightline with airline 2020-12-07 23:41:44 +01:00
bretello 029a867a74
vim: reload all configurations on write 2020-12-07 23:41:44 +01:00
bretello b48649e1d6
vim: add <leader>vv to re-select text after pasting 2020-12-07 23:41:44 +01:00
bretello b2f76856e6
vim: add vim-toml 2020-12-07 23:41:44 +01:00
bretello 4b2b598ed1
vim: add tagbar plugin 2020-12-07 23:41:44 +01:00
4 changed files with 29 additions and 36 deletions

View File

@ -86,36 +86,21 @@ let g:gitgutter_sign_modified_removed = 'x'
" highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
" highlight DiffChange cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
" highlight DiffText cterm=bold ctermfg=10 ctermbg=88 gui=none guifg=bg guibg=Red
" Lightline config from amix's vimrc " TODO: this could be improved
let g:lightline = {
\ 'colorscheme': 'wombat',
\ 'active': {
\ 'left': [ ['mode', 'paste'],
\ ['fugitive', 'readonly', 'filename', 'modified'] ],
\ 'right': [ [ 'lineinfo' ], ['percent'] ]
\ },
\ 'component': {
\ 'readonly': '%{&filetype=="help"?"":&readonly?"¿":""}',
\ 'modified': '%{&filetype=="help"?"":&modified?"+":&modifiable?"":"-"}',
\ 'fugitive': '%{exists("*FugitiveHead")?FugitiveHead():""}'
\ },
\ 'component_visible_condition': {
\ 'readonly': '(&filetype!="help"&& &readonly)',
\ 'modified': '(&filetype!="help"&&(&modified||!&modifiable))',
\ 'fugitive': '(exists("*FugitiveHead") && ""!=FugitiveHead())'
\ },
\ 'separator': { 'left': ' ', 'right': ' ' },
\ 'subseparator': { 'left': ' ', 'right': ' ' }
\ }
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_infos': 'lightline#ale#infos',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok',
\ }
set laststatus=2
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='gruvbox'
" default is '☰' and it sucks
let g:airline_symbols.linenr = ''
" powerline symbols
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
" let g:airline_symbols.linenr = '☰'
" let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.dirty='⚡'
" These are the default mappings for vim-multi-cursor
let g:multi_cursor_start_word_key = '<C-n>'

View File

@ -21,10 +21,9 @@ Plug 'https://github.com/tpope/vim-fugitive'
Plug 'https://github.com/tpope/vim-commentary'
" Browse file system
Plug 'https://github.com/scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
" Minimal status line
Plug 'https://github.com/itchyny/lightline.vim'
" Lightline status for ALE
Plug 'maximbaz/lightline-ale'
" status line
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" Insert parentheses in pairs
Plug 'https://github.com/jiangmiao/auto-pairs'
Plug 'https://github.com/amix/open_file_under_cursor.vim'
@ -39,6 +38,7 @@ Plug 'https://github.com/maxbrunsfeld/vim-yankstack'
" Mark indentation level
Plug 'https://github.com/nathanaelkane/vim-indent-guides'
Plug 'https://github.com/majutsushi/tagbar'
" snipmate
Plug 'https://github.com/MarcWeber/vim-addon-mw-utils'
Plug 'https://github.com/tomtom/tlib_vim'
@ -56,6 +56,7 @@ Plug 'https://github.com/mgedmin/coverage-highlight.vim'
Plug 'https://github.com/rust-lang/rust.vim'
Plug 'https://github.com/vim-scripts/nginx.vim'
Plug 'https://github.com/plasticboy/vim-markdown'
Plug 'https://github.com/cespare/vim-toml'
Plug 'epheien/termdbg'

View File

@ -11,15 +11,18 @@ command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
"Reload vimrc on config change
map <leader>e :e! ~/.vimrc<CR>
map <leader>` :ALELint<CR>
" FIXME: This results in some weird conflict with lightline
autocmd! bufwritepost ~/.vimrc source ~/.vimrc
autocmd! bufwritepost $DOTFILES/vim/* source ~/.vimrc
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<CR>
" Toggle paste mode on and off
nmap <leader>pp :setlocal paste!<CR>
" Re-select the text block just pasted
nnoremap <Leader>vv V`]
" open quickfix
nmap <leader>cc :botright cope<CR>
" close quickfix (also see <leader>C below)
@ -65,6 +68,7 @@ nmap <leader>A :ALEGoToDefinition<CR>
nmap <leader>n :ALEFindReferences<CR>
nmap <leader>h :ALEHover<CR>
nmap <leader>r :ALERename<CR>
map <leader>` :ALELint<CR>
" call ack when pressing gv in visual
vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
@ -106,3 +110,6 @@ noremap <Leader>P "+p
" A friggin python breakpoint. Invoke with @b "FIXME: make this decent
let @b = 'A breakpoint()€ýajkj0'
" Tagbar
nmap <F8> :TagbarToggle<CR>

View File

@ -16,7 +16,7 @@ set relativenumber number
set foldlevelstart=3 foldmethod=syntax nofoldenable "without nofoldenable all folds are closed at startup"
set ttymouse=xterm2 " fix mouse when used in tmux/byobu https://unix.stackexchange.com/q/50733
set nobackup nowb noswapfile " no need for backups of every file
set nobackup nowb noswapfile " no need for backups of every file
set history=10000
set list listchars=tab:\ ,trail:•,extends:#,nbsp:.