configuracion de nvim super modularizada y repartida. no mas vim-plug. todo en preparacion para cuando 0.5 sea estable y empieze a migrar plugins de nuevo. tambien aproveche para limpiar archivos viejos y otras cosas minimas
This commit is contained in:
parent
5d0f2b0431
commit
bf4522ec94
|
@ -17,19 +17,19 @@ scrolling:
|
|||
# Font configuration
|
||||
font:
|
||||
normal:
|
||||
family: JetBrainsMono Nerd Font
|
||||
family: PragmataPro Mono Liga
|
||||
style: Regular
|
||||
|
||||
italic:
|
||||
family: JetBrainsMono Nerd Font
|
||||
family: PragmataPro Mono Liga
|
||||
style: Italic
|
||||
|
||||
bold:
|
||||
family: JetBrainsMono Nerd Font
|
||||
family: PragmataPro Mono Liga
|
||||
style: Bold
|
||||
|
||||
# Point size
|
||||
size: 10
|
||||
size: 11
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||
|
@ -67,7 +67,7 @@ colors:
|
|||
cyan: '#6fc3df'
|
||||
white: '#fcfcfc'
|
||||
|
||||
background_opacity: 1
|
||||
background_opacity: 0.92
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ""
|
||||
|
|
|
@ -22,13 +22,6 @@
|
|||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
<alias>
|
||||
<family>monospace</family>
|
||||
<prefer>
|
||||
<family>NotoSansMono Nerd Font</family>
|
||||
<family>Noto Color Emoji</family>
|
||||
</prefer>
|
||||
</alias>
|
||||
|
||||
<!-- smaller than 9px -->
|
||||
<match target="font">
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[alias]
|
||||
st = status
|
||||
|
||||
[hub]
|
||||
protocol = ssh
|
||||
|
||||
|
@ -25,11 +28,30 @@
|
|||
autocrlf = input
|
||||
whitespace = warn
|
||||
excludesfile = /home/deadguy/.config/git/gitignore
|
||||
pager = delta --plus-color="#012800" --minus-color="#340001"
|
||||
pager = delta
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[delta]
|
||||
features = side-by-side line-numbers decorations
|
||||
syntax-theme = Dracula
|
||||
plus-style = syntax "#003800"
|
||||
minus-style = syntax "#3f0001"
|
||||
whitespace-error-style = 22 reverse
|
||||
|
||||
[delta "decorations"]
|
||||
commit-decoration-style = bold yellow box ul
|
||||
file-style = bold yellow ul
|
||||
file-decoration-style = none
|
||||
hunk-header-decoration-style = cyan box ul
|
||||
|
||||
[delta "line-numbers"]
|
||||
line-numbers-left-style = cyan
|
||||
line-numbers-right-style = cyan
|
||||
line-numbers-minus-style = 124
|
||||
line-numbers-plus-style = 28
|
||||
|
||||
[web]
|
||||
browser = firefox
|
||||
|
||||
|
@ -45,6 +67,7 @@
|
|||
|
||||
[diff]
|
||||
tool = nvr
|
||||
colorMoved = default
|
||||
|
||||
[difftool "nvr"]
|
||||
cmd = nvr -s -d $LOCAL $REMOTE
|
||||
|
|
|
@ -24,7 +24,7 @@ empty_tag_color = blue
|
|||
state_flags_color = red
|
||||
|
||||
# SONG
|
||||
song_list_format = "$5{$4%a}|{$8<unknown artist>} {$8%t}|{$2►$2<untitled>}|{$5►$8 %f} $R {$7%l}"
|
||||
song_list_format = "$5{$4%a}|{$8<unknown artist>} {$8%t}|{$2►$2<untitled>}|{$5►$8 %f} $R {$7%l}"
|
||||
song_status_format = {$8%b}|{$6 "%a"}$8
|
||||
song_window_title_format = "{%a - }{%t}|{%f}"
|
||||
song_columns_list_format = "(30)[blue]{a} (40)[red]{t|f} (30)[cyan]{br} (4f)[green]{lr}"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
let b:ale_linters = ['stylelint']
|
||||
let b:ale_fixers = ['stylelint']
|
|
@ -0,0 +1,2 @@
|
|||
let b:ale_linters = ['prettier_standard']
|
||||
let b:ale_fixers = ['prettier_standard']
|
|
@ -0,0 +1,2 @@
|
|||
let b:ale_linters = ['prettier_standard']
|
||||
let g:ale_fixers = ['prettier_standard']
|
|
@ -0,0 +1,2 @@
|
|||
let b:ale_linters = ['prettier_standard']
|
||||
let b:ale_fixers = ['prettier_standard']
|
|
@ -0,0 +1,2 @@
|
|||
let b:ale_linters = ['prettier_standard']
|
||||
let b:ale_fixers = ['prettier_standard']
|
|
@ -0,0 +1 @@
|
|||
setlocal noexpandtab
|
|
@ -0,0 +1,21 @@
|
|||
setlocal nonumber norelativenumber laststatus=0 showmode
|
||||
setlocal signcolumn=no textwidth=80 wrap sw=2
|
||||
setlocal tabstop=2 expandtab softtabstop=2 linebreak
|
||||
setlocal autoindent noruler colorcolumn=80
|
||||
setlocal spell spelllang=es,en_us,cjk
|
||||
set complete+=kspell
|
||||
|
||||
" Spellcheck
|
||||
nnoremap <buffer> <F7> [s
|
||||
nnoremap <buffer> <F8> ]s
|
||||
nnoremap <buffer> <F9> z=
|
||||
nnoremap <buffer> <F10> z=1<CR><CR>
|
||||
nnoremap <buffer> <F11> zg
|
||||
|
||||
" Todo list
|
||||
nnoremap <silent> <buffer> <C-a> i-[]
|
||||
nnoremap <silent> <buffer> <C-d> :.s/\[\]/\[x\]<Enter>
|
||||
inoremap <silent> <buffer> <C-a> -[]
|
||||
inoremap <silent> <buffer> <C-d> <esc>:.s/\[\]/\[x\]<Enter>
|
||||
|
||||
let b:ale_fixers = ['prettier_standard']
|
|
@ -0,0 +1,2 @@
|
|||
let b:ale_linters = ['stylelint']
|
||||
let b:ale_fixers = ['stylelint']
|
|
@ -7,3 +7,4 @@ endif
|
|||
let b:sh_indent_options['continuation-line'] = 4
|
||||
|
||||
let b:ale_linters = ['shellcheck']
|
||||
let b:ale_fixers = ['shfmt']
|
|
@ -0,0 +1,3 @@
|
|||
let b:ale_linters = ['tsserver', 'eslint']
|
||||
let b:ale_fixers = ['prettier_standard']
|
||||
|
|
@ -0,0 +1 @@
|
|||
let b:ale_linters = ['vint']
|
|
@ -0,0 +1,19 @@
|
|||
highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
|
||||
highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
|
||||
highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
|
||||
highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
|
||||
highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
|
||||
highlight! CocUnderline cterm=undercurl gui=undercurl
|
||||
highlight! PmenuSel guibg=#111111 guifg=#6699cc
|
||||
highlight! Folded ctermbg=NONE guibg=NONE
|
||||
highlight! RedrawDebugClear guibg=#080808
|
||||
highlight! NvimInternalError guifg=#080808
|
||||
highlight! DiffAdded guifg=#333333
|
||||
highlight! PmenuThumb guifg=#333333
|
||||
highlight! link CocErrorSign WarningMsg
|
||||
highlight! link CocWarningSign Number
|
||||
highlight! link CocInfoSign Type
|
||||
|
||||
if &diff
|
||||
highlight! link DiffText MatchParen
|
||||
endif
|
|
@ -0,0 +1,11 @@
|
|||
" Stop the vim-jsx plug-in from aggressively blowing away our ftdetection.
|
||||
"
|
||||
" Without something like this, our ftdetect/{jest,jsx}.vim config will
|
||||
" set the filetype in test files to "javascript.jest" or
|
||||
" "javascript.jest.jsx", but then vim-jsx will come along and unconditionally
|
||||
" set it to "javascript.jsx", which isn't helpful. Currently I'm not working in
|
||||
" any projects that use a ".jsx" extension so this workaround is viable
|
||||
" (unfortunately, there's no other mechanism for disabling this functionality in
|
||||
" vim-jsx).
|
||||
let g:jsx_ext_required=1
|
||||
let g:vim_jsx_pretty_colorful_config = 1
|
|
@ -0,0 +1,18 @@
|
|||
function! dead#functions#MyHighlights() abort
|
||||
highlight Trail ctermbg=red guibg=red
|
||||
call matchadd('Trail', '\s\+$', 100)
|
||||
highlight ColorColumn ctermbg=magenta
|
||||
call matchadd('ColorColumn', '\%81v', 100)
|
||||
endfunction
|
||||
|
||||
function! dead#functions#PopOutOfInsertMode() abort
|
||||
if v:insertmode
|
||||
call feedkeys("\<C-\>\<C-n>")
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! dead#functions#Relativize(v) abort
|
||||
if &number
|
||||
let &relativenumber = a:v
|
||||
endif
|
||||
endfunction
|
|
@ -0,0 +1,79 @@
|
|||
function! dead#statusline#ModeColor() abort
|
||||
return get(g:modes, mode(), '%*')[0]
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#CurrentMode() abort
|
||||
return ' ' . get(g:modes, mode(), '-')[1] . ' '
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#StatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.=dead#statusline#ModeColor()
|
||||
let l:statusline.=dead#statusline#CurrentMode()
|
||||
let l:statusline.=dead#statusline#LinePasteMode()
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%1* '
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=coc#status()
|
||||
let l:statusline.=dead#statusline#LinterStatus()
|
||||
let l:statusline.='%3* %p%% %c '
|
||||
let l:statusline.=''
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#StatusLineNC() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.='%t'
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%= '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#HelpStatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.= '%#error#[HELP] %t '
|
||||
let l:statusline.='%1* '
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=' %p%% '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#UpdateInactiveWindows()
|
||||
for winnum in range(1, winnr('$'))
|
||||
if winnum != winnr()
|
||||
call setwinvar(winnum, '&statusline', '%!dead#statusline#StatusLineNC()')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#RefreshStatusLine(mode)
|
||||
if (a:mode == "active" && &filetype !=? 'help')
|
||||
setlocal statusline=%!dead#statusline#StatusLine()
|
||||
else
|
||||
setlocal statusline=%!dead#statusline#StatusLineNC()
|
||||
endif
|
||||
if &filetype ==? 'help'
|
||||
setlocal statusline=%!dead#statusline#HelpStatusLine()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#LinterStatus() abort
|
||||
let l:counts = ale#statusline#Count(bufnr(''))
|
||||
let l:all_errors = l:counts.error + l:counts.style_error
|
||||
let l:all_non_errors = l:counts.total - l:all_errors
|
||||
return l:counts.total == 0 ? '' : printf(
|
||||
\ ' :%d :%d ',
|
||||
\ l:all_non_errors,
|
||||
\ l:all_errors
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! dead#statusline#LinePasteMode() abort
|
||||
let paste_status = &paste
|
||||
if paste_status == 1
|
||||
return ' paste '
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
|
@ -0,0 +1,28 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
function! dead#tabline#Tabline() abort
|
||||
let s = ''
|
||||
for i in range(tabpagenr('$'))
|
||||
let tab = i + 1
|
||||
let winnr = tabpagewinnr(tab)
|
||||
let buflist = tabpagebuflist(tab)
|
||||
let bufnr = buflist[winnr - 1]
|
||||
let bufname = bufname(bufnr)
|
||||
let bufmodified = getbufvar(bufnr, '&mod')
|
||||
|
||||
let s .= '%' . tab . 'T'
|
||||
let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
|
||||
let s .= ' ' . tab .':'
|
||||
let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ')
|
||||
|
||||
if bufmodified
|
||||
let s .= ' + '
|
||||
endif
|
||||
endfor
|
||||
|
||||
let s .= '%#TabLineFill#'
|
||||
if (exists('g:tablineclosebutton'))
|
||||
let s .= '%=%999XX'
|
||||
endif
|
||||
return s
|
||||
endfunction
|
|
@ -1 +0,0 @@
|
|||
au BufRead,BufNewFile *.ino setlocal ft=arduino
|
|
@ -1 +0,0 @@
|
|||
autocmd BufRead,BufNewFile *.foxdot setfiletype foxdot
|
|
@ -1 +0,0 @@
|
|||
au BufNewFile,BufRead *.gd set filetype=gdscript
|
|
@ -0,0 +1 @@
|
|||
autocmd BufNewFile,BufRead .eslintignore,.gitignore,.prettierignore set filetype=ignore
|
|
@ -0,0 +1,18 @@
|
|||
autocmd FileType * call s:Test()
|
||||
|
||||
function! s:Test()
|
||||
if match(&filetype, '\v<javascript|javascriptreact|typescript|typescriptreact>') == -1
|
||||
return
|
||||
endif
|
||||
|
||||
if match(&filetype, '\v<jest>') != -1
|
||||
return
|
||||
endif
|
||||
|
||||
let l:file=expand('<afile>')
|
||||
|
||||
if match(l:file, '\v(_spec|Spec|-test|\.test)\.(js|jsx|ts|tsx)$') != -1 ||
|
||||
\ match(l:file, '\v/__tests__|tests?/.+\.(js|jsx|ts|tsx)$') != -1
|
||||
noautocmd set filetype+=.jest
|
||||
endif
|
||||
endfunction
|
|
@ -0,0 +1,31 @@
|
|||
function! s:ScanFile()
|
||||
let n = 1
|
||||
let nmax = line('$')
|
||||
if line('$') > 500
|
||||
let nmax = 500
|
||||
endif
|
||||
while n < nmax
|
||||
if getline(n) =~# "\\v<React>"
|
||||
return 1
|
||||
break
|
||||
endif
|
||||
let n = n + 1
|
||||
endwhile
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! s:DetectJSX()
|
||||
if match(&filetype, '\v<jsx>') != -1
|
||||
return
|
||||
endif
|
||||
if s:ScanFile()
|
||||
call s:SetJSX()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:SetJSX()
|
||||
noautocmd set filetype+=.jsx
|
||||
endfunction
|
||||
|
||||
autocmd BufNewFile,BufRead *.js.jsx,*.jsx call s:SetJSX()
|
||||
autocmd BufNewFile,BufRead *.html,*.js call s:DetectJSX()
|
|
@ -1,14 +0,0 @@
|
|||
" Auto-detect a NeoMutt log file
|
||||
|
||||
autocmd BufRead * call <SID>neomutt_log()
|
||||
|
||||
function! s:neomutt_log()
|
||||
let match = '\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] NeoMutt'
|
||||
|
||||
let line = getline (1)
|
||||
if (line !~ match)
|
||||
return
|
||||
endif
|
||||
|
||||
set filetype=neomuttlog
|
||||
endfunction
|
|
@ -1 +0,0 @@
|
|||
au BufNewFile,BufRead neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\} set filetype=mail
|
|
@ -1,2 +0,0 @@
|
|||
" Set filetype to muttrc for files with .mutt extension.
|
||||
autocmd BufNewFile,BufRead *.mutt setfiletype muttrc
|
|
@ -1 +0,0 @@
|
|||
au BufNewFile,BufRead [Nn]eomuttrc,.neomuttrc,.neomutt/*muttrc,.config/neomutt/*muttrc set filetype=neomuttrc
|
|
@ -1 +0,0 @@
|
|||
au BufRead,BufNewFile *.scd,*.sc setlocal ft=supercollider
|
|
@ -1,5 +0,0 @@
|
|||
if &compatible || v:version < 603
|
||||
finish
|
||||
endif
|
||||
|
||||
autocmd BufNewFile,BufRead sxhkdrc,*.sxhkdrc set ft=sxhkdrc
|
|
@ -0,0 +1,5 @@
|
|||
function! s:SetTSX()
|
||||
noautocmd set filetype+=.tsx
|
||||
endfunction
|
||||
|
||||
autocmd BufNewFile,BufRead *.tsx call s:SetTSX()
|
|
@ -1,26 +0,0 @@
|
|||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
if !exists('g:arduino_did_initialize')
|
||||
call arduino#LoadCache()
|
||||
call arduino#InitializeConfig()
|
||||
let g:arduino_did_initialize = 1
|
||||
endif
|
||||
|
||||
" Use C rules for indentation
|
||||
setl cindent
|
||||
|
||||
call arduino#RebuildMakePrg()
|
||||
|
||||
if g:arduino_auto_baud
|
||||
au BufReadPost,BufWritePost *.ino call arduino#SetAutoBaud()
|
||||
endif
|
||||
|
||||
command! -buffer -bar -nargs=? ArduinoChooseBoard call arduino#ChooseBoard(<f-args>)
|
||||
command! -buffer -bar -nargs=? ArduinoChooseProgrammer call arduino#ChooseProgrammer(<f-args>)
|
||||
command! -buffer -bar ArduinoVerify call arduino#Verify()
|
||||
command! -buffer -bar ArduinoUpload call arduino#Upload()
|
||||
command! -buffer -bar ArduinoSerial call arduino#Serial()
|
||||
command! -buffer -bar ArduinoUploadAndSerial call arduino#UploadAndSerial()
|
||||
command! -buffer -bar -nargs=? ArduinoChoosePort call arduino#ChoosePort(<f-args>)
|
|
@ -1,11 +0,0 @@
|
|||
setl ts=4
|
||||
setl sts=4
|
||||
setl sw=4
|
||||
setl noet
|
||||
setl tw=90
|
||||
|
||||
if !exists("b:sh_indent_options")
|
||||
let b:sh_indent_options = {}
|
||||
endif
|
||||
|
||||
let b:sh_indent_options['continuation-line'] = 4
|
|
@ -1,2 +0,0 @@
|
|||
autocmd BufReadPre *.docx set ro
|
||||
autocmd BufReadPost *.docx %!docx2txt.pl
|
|
@ -0,0 +1 @@
|
|||
setlocal noexpandtab
|
|
@ -0,0 +1,3 @@
|
|||
setlocal noexpandtab
|
||||
setlocal shiftwidth=4
|
||||
setlocal tabstop=4
|
|
@ -0,0 +1,3 @@
|
|||
" Work around filetype that landed in upstream Vim here:
|
||||
" https://github.com/vim/vim/issues/4830
|
||||
execute 'noautocmd set filetype=' . substitute(&filetype, 'javascriptreact', 'javascript', '')
|
|
@ -0,0 +1 @@
|
|||
let g:vim_json_syntax_conceal=0
|
|
@ -1,19 +1 @@
|
|||
setlocal nonumber norelativenumber laststatus=0 showmode
|
||||
setlocal signcolumn=no textwidth=80 wrap sw=2
|
||||
setlocal tabstop=2 expandtab softtabstop=2 linebreak
|
||||
setlocal autoindent noruler colorcolumn=80
|
||||
setlocal spell spelllang=es,en_us,cjk
|
||||
set complete+=kspell
|
||||
|
||||
" Spellcheck
|
||||
nnoremap <buffer> <F7> [s
|
||||
nnoremap <buffer> <F8> ]s
|
||||
nnoremap <buffer> <F9> z=
|
||||
nnoremap <buffer> <F10> z=1<CR><CR>
|
||||
nnoremap <buffer> <F11> zg
|
||||
|
||||
" Todo list
|
||||
nnoremap <silent> <buffer> <C-a> i-[]
|
||||
nnoremap <silent> <buffer> <C-d> :.s/\[\]/\[x\]<Enter>
|
||||
inoremap <silent> <buffer> <C-a> -[]
|
||||
inoremap <silent> <buffer> <C-d> <esc>:.s/\[\]/\[x\]<Enter>
|
||||
setlocal synmaxcol=0
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
" Vim filetype plugin file
|
||||
" Language: NeoMutt RC File
|
||||
" Previous Maintainer: Guillaume Brogi <gui-gui@netcourrier.com>
|
||||
" Latest Revision: 2017-09-17
|
||||
" Original version copied from ftplugin/muttrc.vim
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &l:include = '^\s*source\>'
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
|
@ -1,35 +0,0 @@
|
|||
" Proper indentation for python files
|
||||
set fileformat=unix
|
||||
setlocal softtabstop=4 " Pressing tab during editing operations inserts 4 spaces
|
||||
setlocal tabstop=4
|
||||
setlocal shiftwidth=4 " Number of spaces used for each step of an (auto)indent action, e.g. '>>'.
|
||||
let python_highlight_all=1 " Enable python highlighting
|
||||
|
||||
augroup PythonColorColumn
|
||||
autocmd!
|
||||
" When a Python file is read or the text changes in normal or insert mode,
|
||||
" draw a column marking the maximum line length if a line exceeds this length
|
||||
autocmd BufRead,TextChanged *.py call ShowColumnIfLineTooLong(80)
|
||||
augroup END
|
||||
|
||||
" Color the column marking the lengthLimit when the longest line in the file
|
||||
" exceeds the lengthLimit
|
||||
function! ShowColumnIfLineTooLong(lengthLimit)
|
||||
" See https://stackoverflow.com/questions/2075276/longest-line-in-vim#2982789
|
||||
let maxLineLength = max(map(getline(1,'$'), 'len(v:val)'))
|
||||
|
||||
if maxLineLength > a:lengthLimit
|
||||
" Draw the vertical line at the first letter that exceeds the limit
|
||||
execute "setlocal colorcolumn=" . (a:lengthLimit + 1)
|
||||
else
|
||||
setlocal colorcolumn=""
|
||||
endif
|
||||
endfunction
|
||||
|
||||
augroup pystuff
|
||||
autocmd!
|
||||
autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
|
||||
augroup END
|
||||
|
||||
" Disable warnings about trailing whitespace for Python files.
|
||||
let b:ale_warn_about_trailing_whitespace = 0
|
|
@ -1,59 +0,0 @@
|
|||
scriptencoding UTF-8
|
||||
|
||||
""
|
||||
" QuickFix custom foldtext expression.
|
||||
"
|
||||
" setlocal foldexpr=kutsan#ftplugin#qf#foldexpr()
|
||||
""
|
||||
function! qf#foldtext() abort
|
||||
let l:lines = v:foldend - v:foldstart + 1
|
||||
let l:file = substitute(getline(v:foldstart), '\v\c\|.+', '', '')
|
||||
|
||||
return printf('%s [%s]', l:file, l:lines)
|
||||
endfunction
|
||||
|
||||
""
|
||||
" QuickFix custom fold expression.
|
||||
"
|
||||
" setlocal foldtext=kutsan#ftplugin#qf#foldtext(v:lnum)
|
||||
"
|
||||
" @param {number} lnum Line number for the 'foldexpr'.
|
||||
""
|
||||
function! qf#foldexpr(lnum) abort
|
||||
if matchstr(getline(a:lnum), '\v\c^[^|]+') ==# matchstr(getline(a:lnum + 1), '\v\c^[^|]+')
|
||||
return 1
|
||||
else
|
||||
return '<1'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Disable built-in ftplugin.
|
||||
let b:did_ftplugin = v:true
|
||||
|
||||
" Disable relative numbers and use just numbers.
|
||||
setlocal norelativenumber
|
||||
setlocal number
|
||||
|
||||
" Use custom fold expression.
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=qf#foldexpr(v:lnum)
|
||||
|
||||
" Use custom foldtext.
|
||||
setlocal foldtext=qf#foldtext()
|
||||
|
||||
" Start with all folds open.
|
||||
setlocal foldlevel=99
|
||||
|
||||
" Make quickfix buffer hidden.
|
||||
setlocal nobuflisted
|
||||
|
||||
" Set statusline.
|
||||
setlocal statusline=%{repeat('\ ',4)} " Generate space characters given number of times.
|
||||
setlocal statusline+= " Show a custom list icon.
|
||||
setlocal statusline+=%{repeat('\ ',1)}
|
||||
setlocal statusline+=%t " File name, either [Quickfix List] or [Location List].
|
||||
setlocal statusline+=%= " Align all items to right from this point on.
|
||||
setlocal statusline+=%{repeat('\ ',1)}
|
||||
setlocal statusline+=%l/%L " Current line number and total item count.
|
||||
setlocal statusline+=%{repeat('\ ',1)}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
" Work around filetype that landed in upstream Vim here:
|
||||
" https://github.com/vim/vim/issues/4830
|
||||
execute 'noautocmd set filetype=' . substitute(&filetype, 'typescriptreact', 'typescript', '')
|
|
@ -1,13 +0,0 @@
|
|||
setl ts=4
|
||||
setl sts=4
|
||||
setl sw=4
|
||||
setl noet
|
||||
setl tw=90
|
||||
|
||||
let b:ale_linters = ['shell']
|
||||
|
||||
if !exists("b:sh_indent_options")
|
||||
let b:sh_indent_options = {}
|
||||
endif
|
||||
|
||||
let b:sh_indent_options['continuation-line'] = 4
|
|
@ -1,198 +0,0 @@
|
|||
" Vim indent file
|
||||
" Language: gdscript
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Original Author: David Bustos <bustos@caltech.edu>
|
||||
" Last Change: 2013 Jul 9
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" Some preliminary settings
|
||||
setlocal nolisp " Make sure lisp indenting doesn't supersede us
|
||||
setlocal autoindent " indentexpr isn't much help otherwise
|
||||
|
||||
setlocal indentexpr=GetGdscriptIndent(v:lnum)
|
||||
setlocal indentkeys+=<:>,=elif,=except
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*get_gdscript_indent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Come here when loading the script the first time.
|
||||
|
||||
let s:maxoff = 50 " maximum number of lines to look backwards for ()
|
||||
|
||||
function! GetGdscriptIndent(lnum)
|
||||
|
||||
" if this line is explicitly joined: if the previous line was also joined,
|
||||
" line it up with that one, otherwise add two 'shiftwidth'
|
||||
if getline(a:lnum - 1) =~ '\\$'
|
||||
if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
|
||||
return indent(a:lnum - 1)
|
||||
endif
|
||||
return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
|
||||
endif
|
||||
|
||||
" if the start of the line is in a string don't change the indent.
|
||||
if has('syntax_items')
|
||||
\ && synidattr(synid(a:lnum, 1, 1), "name") =~ "string$"
|
||||
return -1
|
||||
endif
|
||||
|
||||
" search backwards for the previous non-empty line.
|
||||
let plnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if plnum == 0
|
||||
" this is the first non-empty line, use zero indent.
|
||||
return 0
|
||||
endif
|
||||
|
||||
" if the previous line is inside parenthesis, use the indent of the starting
|
||||
" line.
|
||||
" trick: use the non-existing "dummy" variable to break out of the loop when
|
||||
" going too far back.
|
||||
call cursor(plnum, 1)
|
||||
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbw',
|
||||
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
|
||||
\ . " synidattr(synid(line('.'), col('.'), 1), 'name')"
|
||||
\ . " =~ '\\(comment\\|todo\\|string\\)$'")
|
||||
if parlnum > 0
|
||||
let plindent = indent(parlnum)
|
||||
let plnumstart = parlnum
|
||||
else
|
||||
let plindent = indent(plnum)
|
||||
let plnumstart = plnum
|
||||
endif
|
||||
|
||||
|
||||
" when inside parenthesis: if at the first line below the parenthesis add
|
||||
" two 'shiftwidth', otherwise same as previous line.
|
||||
" i = (a
|
||||
" + b
|
||||
" + c)
|
||||
call cursor(a:lnum, 1)
|
||||
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bw',
|
||||
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
|
||||
\ . " synidattr(synid(line('.'), col('.'), 1), 'name')"
|
||||
\ . " =~ '\\(comment\\|todo\\|string\\)$'")
|
||||
if p > 0
|
||||
if p == plnum
|
||||
" when the start is inside parenthesis, only indent one 'shiftwidth'.
|
||||
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bw',
|
||||
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
|
||||
\ . " synidattr(synid(line('.'), col('.'), 1), 'name')"
|
||||
\ . " =~ '\\(comment\\|todo\\|string\\)$'")
|
||||
if pp > 0
|
||||
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
|
||||
endif
|
||||
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
|
||||
endif
|
||||
if plnumstart == p
|
||||
return indent(plnum)
|
||||
endif
|
||||
return plindent
|
||||
endif
|
||||
|
||||
|
||||
" get the line and remove a trailing comment.
|
||||
" use syntax highlighting attributes when possible.
|
||||
let pline = getline(plnum)
|
||||
let pline_len = strlen(pline)
|
||||
if has('syntax_items')
|
||||
" if the last character in the line is a comment, do a binary search for
|
||||
" the start of the comment. synid() is slow, a linear search would take
|
||||
" too long on a long line.
|
||||
if synidattr(synid(plnum, pline_len, 1), "name") =~ "\\(comment\\|todo\\)$"
|
||||
let min = 1
|
||||
let max = pline_len
|
||||
while min < max
|
||||
let col = (min + max) / 2
|
||||
if synidattr(synid(plnum, col, 1), "name") =~ "\\(comment\\|todo\\)$"
|
||||
let max = col
|
||||
else
|
||||
let min = col + 1
|
||||
endif
|
||||
endwhile
|
||||
let pline = strpart(pline, 0, min - 1)
|
||||
endif
|
||||
else
|
||||
let col = 0
|
||||
while col < pline_len
|
||||
if pline[col] == '#'
|
||||
let pline = strpart(pline, 0, col)
|
||||
break
|
||||
endif
|
||||
let col = col + 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" if the previous line ended with a colon, indent this line
|
||||
if pline =~ ':\s*$'
|
||||
return plindent + shiftwidth()
|
||||
endif
|
||||
|
||||
" if the previous line was a stop-execution statement...
|
||||
if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
|
||||
" see if the user has already dedented
|
||||
if indent(a:lnum) > indent(plnum) - shiftwidth()
|
||||
" if not, recommend one dedent
|
||||
return indent(plnum) - shiftwidth()
|
||||
endif
|
||||
" otherwise, trust the user
|
||||
return -1
|
||||
endif
|
||||
|
||||
" if the current line begins with a keyword that lines up with "try"
|
||||
if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
|
||||
let lnum = a:lnum - 1
|
||||
while lnum >= 1
|
||||
if getline(lnum) =~ '^\s*\(try\|except\)\>'
|
||||
let ind = indent(lnum)
|
||||
if ind >= indent(a:lnum)
|
||||
return -1 " indent is already less than this
|
||||
endif
|
||||
return ind " line up with previous try or except
|
||||
endif
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
return -1 " no matching "try"!
|
||||
endif
|
||||
|
||||
" if the current line begins with a header keyword, dedent
|
||||
if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
|
||||
|
||||
" unless the previous line was a one-liner
|
||||
if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>'
|
||||
return plindent
|
||||
endif
|
||||
|
||||
" or the user has already dedented
|
||||
if indent(a:lnum) <= plindent - shiftwidth()
|
||||
return -1
|
||||
endif
|
||||
|
||||
return plindent - shiftwidth()
|
||||
endif
|
||||
|
||||
" when after a () construct we probably want to go back to the start line.
|
||||
" a = (b
|
||||
" + c)
|
||||
" here
|
||||
if parlnum > 0
|
||||
return plindent
|
||||
endif
|
||||
|
||||
return -1
|
||||
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:sw=2
|
|
@ -1,42 +0,0 @@
|
|||
"this indent function isn't that smart yet, hopefully it'll improve in the future
|
||||
if exists ("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetSCIndent()
|
||||
setlocal indentkeys+=0),0],0}
|
||||
|
||||
if exists ("*GetSCIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetSCIndent()
|
||||
|
||||
let curr_line = getline(v:lnum)
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let prev_line = getline(lnum)
|
||||
|
||||
let ind = indent(lnum)
|
||||
|
||||
if prev_line =~ '\(\/\/.*\)\@\<![[({]\s*\([^])}]*\)\=$'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
if curr_line =~ '\v^\s*[)}\]]'
|
||||
"if synIDattr(synID(line("."), col("."), 0), "name") =~? "scComment" ||
|
||||
" synIDattr(synID(line("."), col("."), 0), "name") =~? "scString" ||
|
||||
" synIDattr(synID(line("."), col("."), 0), "name") =~? "scSymbol"
|
||||
" "do nothing
|
||||
"else
|
||||
let ind = ind - &sw
|
||||
"end
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
|
@ -1,5 +1,4 @@
|
|||
" Important {{{
|
||||
scriptencoding utf-8 " Set utf-8 as default script encoding
|
||||
let g:loaded_python_provider=1 " Disable python 2 interface
|
||||
let g:python_host_skip_check=1 " Skip python 2 host check
|
||||
if filereadable('bin/python3')
|
||||
|
@ -7,142 +6,8 @@ if filereadable('bin/python3')
|
|||
endif
|
||||
let g:node_host_prog = '~/.local/share/npm/bin/neovim-node-host'
|
||||
let $GIT_EDITOR = 'nvr -cc split --remote-wait'
|
||||
|
||||
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
|
||||
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
|
||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
autocmd VimEnter * PlugInstall --sync | call coc#util#install() | source $MYVIMRC
|
||||
endif
|
||||
" }}}
|
||||
" Options {{{
|
||||
set inccommand=nosplit
|
||||
set clipboard^=unnamedplus
|
||||
set number
|
||||
set noshowmode
|
||||
set showtabline=2
|
||||
set noswapfile
|
||||
set hidden
|
||||
set lazyredraw
|
||||
set showmatch
|
||||
set matchpairs+=<:>
|
||||
set matchtime=1
|
||||
set cpoptions-=m
|
||||
set nojoinspaces
|
||||
set updatetime=300
|
||||
set synmaxcol=200
|
||||
set splitbelow
|
||||
set splitright
|
||||
set notimeout
|
||||
set ignorecase
|
||||
set scrolloff=5
|
||||
set sidescroll=5
|
||||
set shortmess+=aoOIWcs
|
||||
set foldnestmax=10
|
||||
set foldmethod=marker
|
||||
set foldclose=all
|
||||
set foldlevelstart=10
|
||||
set selectmode=key
|
||||
set keymodel=startsel
|
||||
set signcolumn=yes
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
set shiftround
|
||||
set linebreak
|
||||
set breakindent
|
||||
set expandtab
|
||||
set nosmarttab
|
||||
set title
|
||||
set redrawtime=500
|
||||
set ttimeoutlen=10
|
||||
set nowritebackup
|
||||
set completeopt-=preview
|
||||
set nostartofline
|
||||
set undofile
|
||||
set undolevels=1000
|
||||
set undoreload=10000
|
||||
set formatoptions+=nl
|
||||
set formatoptions-=crot
|
||||
set fillchars+=vert:\
|
||||
set listchars+=precedes:<,extends:>
|
||||
set conceallevel=1
|
||||
set diffopt+=algorithm:histogram,indent-heuristic
|
||||
set pastetoggle=<F12>
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
|
||||
let mapleader="\<SPACE>"
|
||||
let maplocalleader=','
|
||||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||
let g:netrw_dirhistmax=0
|
||||
" }}}
|
||||
" Functions {{{
|
||||
function! MyHighlights() abort
|
||||
highlight Trail ctermbg=red guibg=red
|
||||
call matchadd('Trail', '\s\+$', 100)
|
||||
highlight ColorColumn ctermbg=magenta
|
||||
call matchadd('ColorColumn', '\%81v', 100)
|
||||
endfunction
|
||||
|
||||
function! PopOutOfInsertMode() abort
|
||||
if v:insertmode
|
||||
call feedkeys("\<C-\>\<C-n>")
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! Relativize(v) abort
|
||||
if &number
|
||||
let &relativenumber = a:v
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! CmdLine(str)
|
||||
call feedkeys(':' . a:str)
|
||||
endfunction
|
||||
" }}}
|
||||
" AutoCommands {{{
|
||||
if !exists('autocommands_loaded') && has('autocmd')
|
||||
let autocommands_loaded = 1
|
||||
|
||||
aug relativize
|
||||
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call Relativize(1)
|
||||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call Relativize(0)
|
||||
aug END
|
||||
|
||||
aug miscs
|
||||
au CursorHold * silent call CocActionAsync('highlight')
|
||||
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
au ColorScheme * call MyHighlights()
|
||||
aug END
|
||||
|
||||
aug inserts
|
||||
au InsertEnter * setlocal nocursorline
|
||||
au InsertLeave * setlocal cursorline nopaste
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
au FocusLost,TabLeave * call PopOutOfInsertMode()
|
||||
au WinLeave * setlocal nocursorline
|
||||
aug END
|
||||
|
||||
aug file_types
|
||||
au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton
|
||||
au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
|
||||
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
|
||||
au BufNewFile,BufRead requirements*.txt set syntax=python
|
||||
aug END
|
||||
|
||||
aug statusline
|
||||
au VimEnter * call UpdateInactiveWindows()
|
||||
au VimEnter,WinEnter,BufWinEnter * call RefreshStatusLine('active')
|
||||
au WinLeave * call RefreshStatusLine('inactive')
|
||||
augroup END
|
||||
|
||||
aug on_save
|
||||
au BufWritePre * :%s/\s\+$//e
|
||||
au BufWritePost *xresources !xrdb %
|
||||
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
|
||||
au BufWritePost *.tex !pdflatex %
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
endif
|
||||
" }}}
|
||||
" {{{ Ale
|
||||
let g:ale_lint_delay = 0
|
||||
|
@ -159,42 +24,12 @@ let g:ale_sign_error = ''
|
|||
let g:ale_sign_warning = ''
|
||||
let g:ale_sign_info = '●'
|
||||
let g:ale_loclist_msg_format = '[%linter%] %s% (code)% [%severity%]'
|
||||
|
||||
let g:ale_linter_aliases = {
|
||||
\ 'jsx': ['css', 'javascript'],
|
||||
\ 'vue': ['vue', 'javascript'],
|
||||
\}
|
||||
let g:ale_linters = {
|
||||
\ 'javascript': ['prettier_standard'],
|
||||
\ 'jsx': ['prettier_standard'],
|
||||
\ 'typescript': ['tsserver', 'eslint'],
|
||||
\ 'json': ['prettier_standard'],
|
||||
\ 'html': ['prettier_standard'],
|
||||
\ 'css': ['stylelint'],
|
||||
\ 'scss': ['stylelint'],
|
||||
\ 'bash': ['shellcheck'],
|
||||
\ 'sh': ['shellcheck'],
|
||||
\ 'vim': ['vint'],
|
||||
\ 'tex': ['chktex'],
|
||||
\}
|
||||
let g:ale_fixers = {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'jsx': ['prettier_standard'],
|
||||
\ 'javascript': ['prettier_standard'],
|
||||
\ 'typescript': ['prettier_standard'],
|
||||
\ 'json': ['prettier_standard'],
|
||||
\ 'html': ['prettier_standard'],
|
||||
\ 'scss': ['stylelint'],
|
||||
\ 'css': ['stylelint'],
|
||||
\ 'bash': ['shfmt'],
|
||||
\ 'sh': ['shfmt'],
|
||||
\ 'markdown': ['prettier_standard'],
|
||||
\}
|
||||
let g:ale_linter_aliases = { 'jsx': ['css', 'javascript'] }
|
||||
let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'] }
|
||||
let g:ale_pattern_options = {
|
||||
\ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []},
|
||||
\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []},
|
||||
\}
|
||||
|
||||
nmap <silent> <F7> <Plug>(ale_previous_wrap)
|
||||
nmap <silent> <F8> <Plug>(ale_next_wrap)
|
||||
" }}}
|
||||
|
@ -212,29 +47,21 @@ nnoremap <silent><F5> :CocCommand explorer<CR>
|
|||
" Config
|
||||
nnoremap <silent><F6> :CocConfig<CR>
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? coc#_select_confirm() :
|
||||
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ coc#jumpable() ? "\<C-r>=coc#rpc#request('snippetNext',[])\<CR>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
|
||||
inoremap <silent><expr> <S-TAB>
|
||||
\ pumvisible() ? "\<C-p>" :
|
||||
\ coc#jumpable() ? "\<C-r>=coc#rpc#request('snippetPrev',[])\<CR>" :
|
||||
\ "\<C-h>"
|
||||
let g:coc_snippet_next = '<tab>'
|
||||
|
||||
" <CR> to confirm completion
|
||||
if exists('*complete_info')
|
||||
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
else
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
endif
|
||||
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<CR>"
|
||||
" Use <c-space> to trigger completion.
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
|
||||
|
@ -260,29 +87,13 @@ nnoremap <leader>rn <Plug>(coc-rename)
|
|||
let g:vim_markdown_toc_autofit = 1
|
||||
let g:markdown_fenced_languages = ['vim', 'help']
|
||||
let g:javascript_plugin_jsdoc = 1
|
||||
let g:vim_jsx_pretty_colorful_config = 1
|
||||
let g:jsx_ext_required = 1
|
||||
let g:tex_flavor='latex'
|
||||
let g:tex_conceal='abdmg'
|
||||
let g:Tex_DefaultTargetFormat ='pdf'
|
||||
let g:vimtex_compiler_progname = 'nvr'
|
||||
let g:vimtex_view_method = 'zathura'
|
||||
let g:vimtex_motion_matchparen = 0
|
||||
let g:vimtex_quickfix_mode = 0
|
||||
let g:vimtex_complete_enable = 1
|
||||
let g:vimtex_view_use_temp_files = 2
|
||||
"}}}
|
||||
" Plugins {{{
|
||||
call plug#begin(stdpath('data') . '/plugged')
|
||||
Plug 'dense-analysis/ale'
|
||||
Plug 'lervag/vimtex', {'for': 'latex'}
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'tmsvg/pear-tree'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'lambdalisue/gina.vim'
|
||||
Plug 'srcery-colors/srcery-vim'
|
||||
call plug#end()
|
||||
packadd! vim-polyglot
|
||||
packadd! pear-tree
|
||||
packadd! loupe
|
||||
packadd! vim-commentary
|
||||
packadd! gina.vim
|
||||
" }}}
|
||||
" Colors {{{
|
||||
set termguicolors
|
||||
|
@ -290,324 +101,6 @@ let g:srcery_transparent_background = 1
|
|||
let g:srcery_italic = 1
|
||||
let g:srcery_underline = 1
|
||||
let g:srcery_undercurl = 1
|
||||
let g:srcery_inverse_matches = 1
|
||||
colorscheme srcery
|
||||
|
||||
highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
|
||||
highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
|
||||
highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
|
||||
highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
|
||||
highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
|
||||
highlight! CocUnderline cterm=undercurl gui=undercurl
|
||||
highlight! PmenuSel guibg=#111111 guifg=#6699cc
|
||||
highlight! Folded ctermbg=NONE guibg=NONE
|
||||
highlight! RedrawDebugClear guibg=#080808
|
||||
highlight! NvimInternalError guifg=#080808
|
||||
highlight! DiffAdded guifg=#333333
|
||||
highlight! PmenuThumb guifg=#333333
|
||||
highlight! link CocErrorSign WarningMsg
|
||||
highlight! link CocWarningSign Number
|
||||
highlight! link CocInfoSign Type
|
||||
|
||||
if &diff
|
||||
highlight! link DiffText MatchParen
|
||||
endif
|
||||
" }}}
|
||||
" Statusline {{{
|
||||
highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6
|
||||
highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782
|
||||
highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4
|
||||
highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6
|
||||
highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff
|
||||
highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34
|
||||
highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a
|
||||
|
||||
let g:modes={
|
||||
\ 'n' : ['%3*', 'NORMAL'],
|
||||
\ 'no' : ['%3*', 'N·OPERATOR PENDING'],
|
||||
\ 'v' : ['%5*', 'VISUAL'],
|
||||
\ 'V' : ['%5*', 'V·LINE'],
|
||||
\ '' : ['%5*', 'V·BLOCK'],
|
||||
\ 's' : ['%7*', 'SELECT'],
|
||||
\ 'S' : ['%7*', 'S·LINE'],
|
||||
\ '' : ['%7*', 'S·BLOCK'],
|
||||
\ 'i' : ['%4*', 'INSERT'],
|
||||
\ 'R' : ['%2*', 'REPLACE'],
|
||||
\ 'Rv' : ['%2*', 'V·REPLACE'],
|
||||
\ 'c' : ['%6*', 'COMMAND'],
|
||||
\ 'cv' : ['%6*', 'VIM EX'],
|
||||
\ 'ce' : ['%6*', 'EX'],
|
||||
\ 'r' : ['%1*', 'PROMPT'],
|
||||
\ 'rm' : ['%1*', 'MORE'],
|
||||
\ 'r?' : ['%1*', 'CONFIRM'],
|
||||
\ '!' : ['%*1', 'SHELL'],
|
||||
\ 't' : ['%*1', 'TERMINAL']
|
||||
\}
|
||||
|
||||
function! ModeColor() abort
|
||||
return get(g:modes, mode(), '%*')[0]
|
||||
endfunction
|
||||
|
||||
function! CurrentMode() abort
|
||||
return ' ' . get(g:modes, mode(), '-')[1] . ' '
|
||||
endfunction
|
||||
|
||||
function! StatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.=ModeColor()
|
||||
let l:statusline.=CurrentMode()
|
||||
let l:statusline.=LinePasteMode()
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%1* '
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=coc#status()
|
||||
let l:statusline.=LinterStatus()
|
||||
let l:statusline.='%3* %p%% %c '
|
||||
let l:statusline.=''
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! StatusLineNC() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.='%t'
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%= '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! HelpStatusLine() abort
|
||||
let l:statusline=''
|
||||
let l:statusline.= '%#error#[HELP] %t '
|
||||
let l:statusline.='%1* '
|
||||
let l:statusline.='%<'
|
||||
let l:statusline.='%= '
|
||||
let l:statusline.=' %p%% '
|
||||
return l:statusline
|
||||
endfunction
|
||||
|
||||
function! UpdateInactiveWindows()
|
||||
for winnum in range(1, winnr('$'))
|
||||
if winnum != winnr()
|
||||
call setwinvar(winnum, '&statusline', '%!StatusLineNC()')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! RefreshStatusLine(mode)
|
||||
if (a:mode == "active" && &filetype !=? 'help')
|
||||
setlocal statusline=%!StatusLine()
|
||||
else
|
||||
setlocal statusline=%!StatusLineNC()
|
||||
endif
|
||||
if &filetype ==? 'help'
|
||||
setlocal statusline=%!HelpStatusLine()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! LinterStatus() abort
|
||||
let l:counts = ale#statusline#Count(bufnr(''))
|
||||
let l:all_errors = l:counts.error + l:counts.style_error
|
||||
let l:all_non_errors = l:counts.total - l:all_errors
|
||||
return l:counts.total == 0 ? '' : printf(
|
||||
\ ' :%d :%d ',
|
||||
\ l:all_non_errors,
|
||||
\ l:all_errors
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! LinePasteMode() abort
|
||||
let paste_status = &paste
|
||||
if paste_status == 1
|
||||
return ' paste '
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
endfunction
|
||||
" }}}
|
||||
" Tabline {{{
|
||||
function! Tabline()
|
||||
let s = ''
|
||||
for i in range(tabpagenr('$'))
|
||||
let tab = i + 1
|
||||
let winnr = tabpagewinnr(tab)
|
||||
let buflist = tabpagebuflist(tab)
|
||||
let bufnr = buflist[winnr - 1]
|
||||
let bufname = bufname(bufnr)
|
||||
let bufmodified = getbufvar(bufnr, '&mod')
|
||||
|
||||
let s .= '%' . tab . 'T'
|
||||
let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
|
||||
let s .= ' ' . tab .':'
|
||||
let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ')
|
||||
|
||||
if bufmodified
|
||||
let s .= ' + '
|
||||
endif
|
||||
endfor
|
||||
|
||||
let s .= '%#TabLineFill#'
|
||||
if (exists('g:tablineclosebutton'))
|
||||
let s .= '%=%999XX'
|
||||
endif
|
||||
return s
|
||||
endfunction
|
||||
set tabline=%!Tabline()
|
||||
" }}}
|
||||
"Mappings {{{
|
||||
"Normal {{{
|
||||
" Ñ master race
|
||||
nnoremap ñ ;
|
||||
nnoremap Ñ ,
|
||||
|
||||
" Rearrange Splits
|
||||
nnoremap <silent> <S-Left> <C-W>H
|
||||
nnoremap <silent> <S-Right> <C-W>L
|
||||
nnoremap <silent> <S-Up> <C-W>K
|
||||
nnoremap <silent> <S-Down> <C-W>J
|
||||
|
||||
" Resize splits
|
||||
nnoremap <silent> <Left> :vertical resize -2<CR>
|
||||
nnoremap <silent> <Right> :vertical resize +2<CR>
|
||||
nnoremap <silent> <Up> :resize -1<CR>
|
||||
nnoremap <silent> <Down> :resize +1<CR>
|
||||
|
||||
" Alt to switch windows
|
||||
nnoremap <M-j> <C-W><C-J>
|
||||
nnoremap <M-k> <C-W><C-K>
|
||||
nnoremap <M-l> <C-W><C-L>
|
||||
nnoremap <M-h> <C-W><C-H>
|
||||
|
||||
" Edit and source config file
|
||||
nnoremap <silent> <leader>ev :vsplit $MYVIMRC<CR>
|
||||
nnoremap <silent> <leader>sv :source $MYVIMRC<CR>
|
||||
|
||||
" Gotta Go Fast (save, buffer close, quit, messages, SOF, EOF)
|
||||
nnoremap <silent> <leader>g :w!<CR>
|
||||
nnoremap <silent> <leader>b :bdelete<CR>
|
||||
nnoremap <silent> <leader>q :q!<CR>
|
||||
nnoremap <silent> <leader>Q :qa!<CR>
|
||||
nnoremap <silent> <leader>m :messages<CR>
|
||||
nnoremap <Bar> gg
|
||||
nnoremap ¿ G
|
||||
|
||||
" Splits
|
||||
nnoremap <silent> <leader>v :vnew<CR>
|
||||
nnoremap <silent> <leader>h :new<CR><CR>
|
||||
|
||||
" Quote words under cursor
|
||||
nnoremap <leader>" viW<esc>a"<esc>gvo<esc>i"<esc>gvo<esc>3l
|
||||
nnoremap <leader>' viW<esc>a'<esc>gvo<esc>i'<esc>gvo<esc>3l
|
||||
|
||||
" Move a line of text using Shift+[jk]
|
||||
nnoremap <silent> J mz:m+<cr>`z
|
||||
nnoremap <silent> K mz:m-2<cr>`z
|
||||
|
||||
" My vim wants to enter all the time, enter all the time
|
||||
nnoremap <silent> <leader>o :call append(line('.'), '')<CR>
|
||||
nnoremap <silent> <leader>O :call append(line('.')-1, '')<CR>
|
||||
|
||||
" Unhighlight search terms
|
||||
nnoremap <silent> <leader><space> :noh<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
||||
|
||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
||||
nnoremap <buffer><silent><expr>j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
||||
nnoremap <buffer><silent><expr>k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
|
||||
|
||||
" Line movements
|
||||
noremap <silent> <Home> g<Home>
|
||||
noremap <silent> <End> g<End>
|
||||
nnoremap <leader>y 0y$
|
||||
nnoremap Y y$
|
||||
|
||||
" Tab movement
|
||||
nnoremap tn :tabnew<cr>
|
||||
nnoremap th :tabfirst<cr>
|
||||
nnoremap tl :tablast<cr>
|
||||
nnoremap tx :tabclose<cr>
|
||||
|
||||
" Center view on search result
|
||||
nnoremap n nzz
|
||||
nnoremap N Nzz
|
||||
nnoremap * *zz
|
||||
nnoremap # #zz
|
||||
nnoremap g* g*zz
|
||||
nnoremap g# g#zz
|
||||
|
||||
" Prevent x from overriding what's in the clipboard.
|
||||
nnoremap x "_x
|
||||
nnoremap X "_x
|
||||
|
||||
" Prevent selecting and pasting from overwriting what you originally copied.
|
||||
xnoremap p pgvy
|
||||
|
||||
" Global replace
|
||||
nnoremap <Leader>sw
|
||||
\ :let b:sub = input('global replacement: ') <Bar>
|
||||
\ if b:sub !=? '' <Bar>
|
||||
\ execute "%s/<C-r><C-w>/".b:sub.'/g' <Bar>
|
||||
\ unlet b:sub <Bar>
|
||||
\ endif <CR>
|
||||
|
||||
" What about the Q
|
||||
nnoremap Q <nop>
|
||||
map q <nop>
|
||||
"}}}
|
||||
"Insert {{{
|
||||
" Ensure that ctrl+u in insert mode can be reversed
|
||||
" http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U
|
||||
inoremap <c-u> <c-g>u<c-u>
|
||||
inoremap <c-w> <c-g>u<c-w>
|
||||
|
||||
" Better nav for omnicomplete
|
||||
inoremap <expr> <c-j> ("\<C-n>")
|
||||
inoremap <expr> <c-k> ("\<C-p>")
|
||||
|
||||
" Exit insert, dd line, enter insert
|
||||
inoremap <A-d> <esc>ddi
|
||||
|
||||
" Line movements
|
||||
inoremap <silent> <Home> <C-o>g<Home>
|
||||
inoremap <silent> <End> <C-o>g<End>
|
||||
|
||||
" Alt to switch windows
|
||||
inoremap <A-h> <Esc><C-w>h
|
||||
inoremap <A-j> <Esc><C-w>j
|
||||
inoremap <A-k> <Esc><C-w>k
|
||||
inoremap <A-l> <Esc><C-w>l
|
||||
"}}}
|
||||
"Visual {{{
|
||||
" Fast beginning and end of document
|
||||
vnoremap ¿ G
|
||||
vnoremap <Bar> gg
|
||||
|
||||
" Move a line of text using Shift+[jk]
|
||||
vnoremap <S-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||
vnoremap <S-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||
|
||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
||||
vnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
||||
vnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
||||
|
||||
" Fix indentation without leaving visual mode
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
||||
" Keep cursor at the bottom of the visual selection after you yank it.
|
||||
vmap y ygv<Esc>
|
||||
|
||||
" Delete current visual selection and dump in black hole buffer before pasting
|
||||
" Used when you want to paste over something without it getting copied to
|
||||
" Vim's default buffer
|
||||
vnoremap p "_dP
|
||||
|
||||
" global replace
|
||||
vnoremap <Leader>sw "hy
|
||||
\ :let b:sub = input('global replacement: ') <Bar>
|
||||
\ if b:sub !=? '' <Bar>
|
||||
\ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') <Bar>
|
||||
\ execute '%s/'.b:rep."/".b:sub.'/g' <Bar>
|
||||
\ unlet b:sub b:rep <Bar>
|
||||
\ endif <CR>
|
||||
"}}}
|
||||
"}}}
|
||||
" vim:foldmethod=marker:foldlevel=0
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
if !exists('autocommands_loaded') && has('autocmd')
|
||||
let autocommands_loaded = 1
|
||||
|
||||
aug relativize
|
||||
au BufWinEnter,FocusGained,InsertLeave,WinEnter * call dead#functions#Relativize(1)
|
||||
au BufWinLeave,FocusLost,InsertEnter,WinLeave * call dead#functions#Relativize(0)
|
||||
aug END
|
||||
|
||||
aug miscs
|
||||
au CursorHold * silent call CocActionAsync('highlight')
|
||||
au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
au ColorScheme * call dead#functions#MyHighlights()
|
||||
aug END
|
||||
|
||||
aug inserts
|
||||
au InsertEnter * setlocal nocursorline
|
||||
au InsertLeave * setlocal cursorline nopaste
|
||||
au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||
au FocusLost,TabLeave * call dead#functions#PopOutOfInsertMode()
|
||||
au WinLeave * setlocal nocursorline
|
||||
aug END
|
||||
|
||||
aug file_types
|
||||
au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton
|
||||
au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
|
||||
au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
|
||||
au BufNewFile,BufRead requirements*.txt set syntax=python
|
||||
aug END
|
||||
|
||||
aug statusline
|
||||
au VimEnter * call dead#statusline#UpdateInactiveWindows()
|
||||
au VimEnter,WinEnter,BufWinEnter * call dead#statusline#RefreshStatusLine('active')
|
||||
au WinLeave * call dead#statusline#RefreshStatusLine('inactive')
|
||||
augroup END
|
||||
|
||||
aug on_save
|
||||
au BufWritePre * :%s/\s\+$//e
|
||||
au BufWritePost *xresources !xrdb %
|
||||
au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
|
||||
au BufWritePost *.tex !pdflatex %
|
||||
au QuitPre * if empty(&buftype) | lclose | endif
|
||||
aug END
|
||||
endif
|
|
@ -0,0 +1,23 @@
|
|||
"Insert mode
|
||||
|
||||
" Ensure that ctrl+u in insert mode can be reversed
|
||||
" http://vim.wikia.com/wiki/Recover_from_accidental_Ctrl-U
|
||||
inoremap <c-u> <c-g>u<c-u>
|
||||
inoremap <c-w> <c-g>u<c-w>
|
||||
|
||||
" Better nav for omnicomplete
|
||||
inoremap <expr> <c-j> ("\<C-n>")
|
||||
inoremap <expr> <c-k> ("\<C-p>")
|
||||
|
||||
" Exit insert, dd line, enter insert
|
||||
inoremap <A-d> <esc>ddi
|
||||
|
||||
" Line movements
|
||||
inoremap <silent> <Home> <C-o>g<Home>
|
||||
inoremap <silent> <End> <C-o>g<End>
|
||||
|
||||
" Alt to switch windows
|
||||
inoremap <A-h> <Esc><C-w>h
|
||||
inoremap <A-j> <Esc><C-w>j
|
||||
inoremap <A-k> <Esc><C-w>k
|
||||
inoremap <A-l> <Esc><C-w>l
|
|
@ -0,0 +1,81 @@
|
|||
"Normal mode
|
||||
|
||||
" Ñ master race
|
||||
nnoremap ñ ;
|
||||
nnoremap Ñ ,
|
||||
|
||||
" Rearrange Splits
|
||||
nnoremap <silent> <S-Left> <C-W>H
|
||||
nnoremap <silent> <S-Right> <C-W>L
|
||||
nnoremap <silent> <S-Up> <C-W>K
|
||||
nnoremap <silent> <S-Down> <C-W>J
|
||||
|
||||
" Resize splits
|
||||
nnoremap <silent> <Left> :vertical resize -2<CR>
|
||||
nnoremap <silent> <Right> :vertical resize +2<CR>
|
||||
nnoremap <silent> <Up> :resize -1<CR>
|
||||
nnoremap <silent> <Down> :resize +1<CR>
|
||||
|
||||
" Alt to switch windows
|
||||
nnoremap <M-j> <C-W><C-J>
|
||||
nnoremap <M-k> <C-W><C-K>
|
||||
nnoremap <M-l> <C-W><C-L>
|
||||
nnoremap <M-h> <C-W><C-H>
|
||||
|
||||
" Gotta Go Fast (save, buffer close, quit, messages, newlines, SOF, EOF)
|
||||
nnoremap <silent> <leader>g :w!<CR>
|
||||
nnoremap <silent> <leader>b :bdelete<CR>
|
||||
nnoremap <silent> <leader>q :q!<CR>
|
||||
nnoremap <silent> <leader>Q :qa!<CR>
|
||||
nnoremap <silent> <leader>m :messages<CR>
|
||||
nnoremap <silent> <leader>o :call append(line('.'), '')<CR>
|
||||
nnoremap <silent> <leader>O :call append(line('.')-1, '')<CR>
|
||||
nnoremap <Bar> gg
|
||||
nnoremap ¿ G
|
||||
|
||||
" Splits
|
||||
nnoremap <silent> <leader>v :vnew<CR>
|
||||
nnoremap <silent> <leader>h :new<CR><CR>
|
||||
|
||||
" Quote words under cursor
|
||||
nnoremap <leader>" viW<esc>a"<esc>gvo<esc>i"<esc>gvo<esc>3l
|
||||
nnoremap <leader>' viW<esc>a'<esc>gvo<esc>i'<esc>gvo<esc>3l
|
||||
|
||||
" Move a line of text using Shift+[jk]
|
||||
nnoremap <silent> J mz:m+<cr>`z
|
||||
nnoremap <silent> K mz:m-2<cr>`z
|
||||
|
||||
" Unhighlight search terms
|
||||
nnoremap <silent> <leader><space> :noh<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
||||
|
||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
||||
nnoremap <buffer><silent><expr>j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
|
||||
nnoremap <buffer><silent><expr>k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
|
||||
|
||||
" Line movements
|
||||
nnoremap <silent> <Home> g<Home>
|
||||
nnoremap <silent> <End> g<End>
|
||||
nnoremap <leader>y 0y$
|
||||
nnoremap Y y$
|
||||
|
||||
" Tab movement
|
||||
nnoremap tn :tabnew<cr>
|
||||
nnoremap th :tabfirst<cr>
|
||||
nnoremap tl :tablast<cr>
|
||||
nnoremap tx :tabclose<cr>
|
||||
|
||||
" Prevent x from overriding what's in the clipboard.
|
||||
nnoremap x "_x
|
||||
nnoremap X "_x
|
||||
|
||||
" Global replace
|
||||
nnoremap <Leader>sw
|
||||
\ :let b:sub = input('global replacement: ') <Bar>
|
||||
\ if b:sub !=? '' <Bar>
|
||||
\ execute "%s/<C-r><C-w>/".b:sub.'/g' <Bar>
|
||||
\ unlet b:sub <Bar>
|
||||
\ endif <CR>
|
||||
|
||||
" What about the Q
|
||||
nnoremap Q <nop>
|
||||
map q <nop>
|
|
@ -0,0 +1,33 @@
|
|||
"Visual {{{
|
||||
" Fast beginning and end of document
|
||||
vnoremap ¿ G
|
||||
vnoremap <Bar> gg
|
||||
|
||||
" Move a line of text using Shift+[jk]
|
||||
vnoremap <S-j> :m'>+<cr>`<my`>mzgv`yo`z
|
||||
vnoremap <S-k> :m'<-2<cr>`>my`<mzgv`yo`z
|
||||
|
||||
" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
|
||||
vnoremap <buffer><silent><expr>j v:count ? 'j' : 'gj'
|
||||
vnoremap <buffer><silent><expr>k v:count ? 'k' : 'gk'
|
||||
|
||||
" Fix indentation without leaving visual mode
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
||||
" Keep cursor at the bottom of the visual selection after you yank it.
|
||||
vmap y ygv<Esc>
|
||||
|
||||
" Delete current visual selection and dump in black hole buffer before pasting
|
||||
" Used when you want to paste over something without it getting copied to
|
||||
" Vim's default buffer
|
||||
vnoremap p "_dP
|
||||
|
||||
" global replace
|
||||
vnoremap <Leader>sw "hy
|
||||
\ :let b:sub = input('global replacement: ') <Bar>
|
||||
\ if b:sub !=? '' <Bar>
|
||||
\ let b:rep = substitute(getreg('h'), '/', '\\/', 'g') <Bar>
|
||||
\ execute '%s/'.b:rep."/".b:sub.'/g' <Bar>
|
||||
\ unlet b:sub b:rep <Bar>
|
||||
\ endif <CR>
|
|
@ -0,0 +1,68 @@
|
|||
" Settings
|
||||
scriptencoding utf-8
|
||||
|
||||
set inccommand=nosplit
|
||||
set clipboard^=unnamedplus
|
||||
set number
|
||||
set noshowmode
|
||||
set showtabline=2
|
||||
set noswapfile
|
||||
set hidden
|
||||
set lazyredraw
|
||||
set showmatch
|
||||
set matchpairs+=<:>
|
||||
set matchtime=1
|
||||
set cpoptions-=m
|
||||
set nojoinspaces
|
||||
set updatetime=300
|
||||
set synmaxcol=200
|
||||
set splitbelow
|
||||
set splitright
|
||||
set notimeout
|
||||
set ignorecase
|
||||
set scrolloff=5
|
||||
set sidescroll=5
|
||||
set shortmess+=aoOIWcs
|
||||
set foldnestmax=10
|
||||
set foldmethod=marker
|
||||
set foldclose=all
|
||||
set foldlevelstart=10
|
||||
set selectmode=key
|
||||
set keymodel=startsel
|
||||
set signcolumn=yes
|
||||
set tabstop=2
|
||||
set shiftwidth=2
|
||||
set softtabstop=2
|
||||
set shiftround
|
||||
set linebreak
|
||||
set breakindent
|
||||
set expandtab
|
||||
set nosmarttab
|
||||
set title
|
||||
set redrawtime=500
|
||||
set ttimeoutlen=10
|
||||
set nowritebackup
|
||||
set completeopt-=preview
|
||||
set nostartofline
|
||||
set undofile
|
||||
set undolevels=1000
|
||||
set undoreload=10000
|
||||
set formatoptions+=nl
|
||||
set formatoptions-=crot
|
||||
set fillchars+=vert:\
|
||||
set listchars+=precedes:<,extends:>
|
||||
set conceallevel=1
|
||||
set diffopt+=algorithm:histogram,indent-heuristic
|
||||
set diffopt+=foldcolumn:0
|
||||
set pastetoggle=<F12>
|
||||
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
|
||||
|
||||
let mapleader="\<SPACE>"
|
||||
let maplocalleader=','
|
||||
let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
|
||||
let g:netrw_dirhistmax=0
|
||||
|
||||
if exists('$SUDO_USER')
|
||||
set nobackup
|
||||
set noundofile
|
||||
endif
|
|
@ -0,0 +1,31 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6
|
||||
highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782
|
||||
highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4
|
||||
highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6
|
||||
highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff
|
||||
highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34
|
||||
highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a
|
||||
|
||||
let g:modes={
|
||||
\ 'n' : ['%3*', 'NORMAL'],
|
||||
\ 'no' : ['%3*', 'N·OPERATOR PENDING'],
|
||||
\ 'v' : ['%5*', 'VISUAL'],
|
||||
\ 'V' : ['%5*', 'V·LINE'],
|
||||
\ '' : ['%5*', 'V·BLOCK'],
|
||||
\ 's' : ['%7*', 'SELECT'],
|
||||
\ 'S' : ['%7*', 'S·LINE'],
|
||||
\ '' : ['%7*', 'S·BLOCK'],
|
||||
\ 'i' : ['%4*', 'INSERT'],
|
||||
\ 'R' : ['%2*', 'REPLACE'],
|
||||
\ 'Rv' : ['%2*', 'V·REPLACE'],
|
||||
\ 'c' : ['%6*', 'COMMAND'],
|
||||
\ 'cv' : ['%6*', 'VIM EX'],
|
||||
\ 'ce' : ['%6*', 'EX'],
|
||||
\ 'r' : ['%1*', 'PROMPT'],
|
||||
\ 'rm' : ['%1*', 'MORE'],
|
||||
\ 'r?' : ['%1*', 'CONFIRM'],
|
||||
\ '!' : ['%*1', 'SHELL'],
|
||||
\ 't' : ['%*1', 'TERMINAL']
|
||||
\}
|
|
@ -0,0 +1 @@
|
|||
set tabline=%!dead#tabline#Tabline()
|
|
@ -0,0 +1,6 @@
|
|||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax match Comment +\/\/.\+$+
|
|
@ -1,65 +0,0 @@
|
|||
" Vim syntax file
|
||||
" Language: NeoMutt log files
|
||||
" Maintainer: Richard Russon <rich@flatcap.org>
|
||||
" Last Change: 2018-02-16
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax match neolog_date "\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] *" conceal
|
||||
syntax match neolog_version "\v<NeoMutt-\d{8}(-\d+-\x+)*(-dirty)*>"
|
||||
syntax match neolog_banner "\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] .*" contains=neolog_date,neolog_version
|
||||
syntax match neolog_function "\v%26v\i+\(\)"
|
||||
|
||||
syntax match neolog_perror_key "\v%22v\<P\> " conceal transparent
|
||||
syntax match neolog_error_key "\v%22v\<E\> " conceal transparent
|
||||
syntax match neolog_warning_key "\v%22v\<W\> " conceal transparent
|
||||
syntax match neolog_message_key "\v%22v\<M\> " conceal transparent
|
||||
syntax match neolog_debug1_key "\v%22v\<1\> " conceal transparent
|
||||
syntax match neolog_debug2_key "\v%22v\<2\> " conceal transparent
|
||||
syntax match neolog_debug3_key "\v%22v\<3\> " conceal transparent
|
||||
syntax match neolog_debug4_key "\v%22v\<4\> " conceal transparent
|
||||
syntax match neolog_debug5_key "\v%22v\<5\> " conceal transparent
|
||||
|
||||
syntax match neolog_perror "\v%22v\<P\> .*" contains=neolog_perror_key,neolog_function
|
||||
syntax match neolog_error "\v%22v\<E\> .*" contains=neolog_error_key,neolog_function
|
||||
syntax match neolog_warning "\v%22v\<W\> .*" contains=neolog_warning_key,neolog_function
|
||||
syntax match neolog_message "\v%22v\<M\> .*" contains=neolog_message_key,neolog_function
|
||||
syntax match neolog_debug1 "\v%22v\<1\> .*" contains=neolog_debug1_key,neolog_function
|
||||
syntax match neolog_debug2 "\v%22v\<2\> .*" contains=neolog_debug2_key,neolog_function
|
||||
syntax match neolog_debug3 "\v%22v\<3\> .*" contains=neolog_debug3_key,neolog_function
|
||||
syntax match neolog_debug4 "\v%22v\<4\> .*" contains=neolog_debug4_key,neolog_function
|
||||
syntax match neolog_debug5 "\v%22v\<5\> .*" contains=neolog_debug5_key,neolog_function
|
||||
|
||||
if exists('g:neolog_default_colors')
|
||||
highlight neolog_date ctermfg=cyan guifg=#40ffff
|
||||
highlight neolog_banner ctermfg=magenta guifg=#ff00ff
|
||||
highlight neolog_version cterm=reverse
|
||||
highlight neolog_function guibg=#282828
|
||||
|
||||
highlight neolog_perror ctermfg=red guifg=#ff8080
|
||||
highlight neolog_error ctermfg=red guifg=#ff8080
|
||||
highlight neolog_warning ctermfg=yellow guifg=#ffff80
|
||||
highlight neolog_message ctermfg=green guifg=#80ff80
|
||||
highlight neolog_debug1 ctermfg=white guifg=#ffffff
|
||||
highlight neolog_debug2 ctermfg=white guifg=#ffffff
|
||||
highlight neolog_debug3 ctermfg=grey guifg=#c0c0c0
|
||||
highlight neolog_debug4 ctermfg=grey guifg=#c0c0c0
|
||||
highlight neolog_debug5 ctermfg=grey guifg=#c0c0c0
|
||||
endif
|
||||
|
||||
highlight link neolog_perror_key neolog_perror
|
||||
highlight link neolog_error_key neolog_error
|
||||
highlight link neolog_warning_key neolog_warning
|
||||
highlight link neolog_message_key neolog_message
|
||||
highlight link neolog_debug1_key neolog_debug1
|
||||
highlight link neolog_debug2_key neolog_debug2
|
||||
highlight link neolog_debug3_key neolog_debug3
|
||||
highlight link neolog_debug4_key neolog_debug4
|
||||
highlight link neolog_debug5_key neolog_debug5
|
||||
|
||||
let b:current_syntax = "neomuttlog"
|
||||
|
||||
" vim: ts=2 et tw=100 sw=2 sts=0 ft=vim
|
File diff suppressed because it is too large
Load Diff
|
@ -1,130 +0,0 @@
|
|||
" Copyright 2007 Alex Norman
|
||||
" This file is part of SCVIM.
|
||||
"
|
||||
" SCVIM is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
"
|
||||
" SCVIM is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
"
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with SCVIM. If not, see <http://www.gnu.org/licenses/>.
|
||||
"
|
||||
" Vim syntax file
|
||||
" Language: supercollider
|
||||
" Maintainer: Stephen Lumenta <stephen.lumenta@gmail.com>
|
||||
" Version: 0.2
|
||||
" Last change: 2012-03-31
|
||||
|
||||
syn clear
|
||||
|
||||
syn match scAoperator "{"
|
||||
syn match scAoperator "}"
|
||||
|
||||
"syn match scVariable "\%(var.*\)\@<=\(\l\w*\)" "lowercase followed by wordchar
|
||||
syn match scGlobvariable "\~\l\w*" "~ followed by lowercase followed by wordchar
|
||||
syn match scVar "\s*var\s"
|
||||
syn match scVar "\s*classvar\s"
|
||||
syn match scArg "\s*arg\s"
|
||||
|
||||
" symbols, strings, numbers
|
||||
syn match scSymbol "\v(\w|\\)@<!\'.{-}(\\)@<!\'" "\{-} is a non greedy version of *
|
||||
syn match scSymbol "\v\$@<!\\\w\w*"
|
||||
syn match scSymbol "\\\\"
|
||||
syn match scSymbol "\w\+:"
|
||||
|
||||
syn region scString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
|
||||
syn match scChar "\$\\\?."
|
||||
|
||||
syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
|
||||
syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
|
||||
syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
|
||||
syn match scInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display
|
||||
syn match scFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display
|
||||
syn match scFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display
|
||||
syn match scInfinity "inf"
|
||||
|
||||
" keywords
|
||||
syn match scControl "\<\%(break\|rescue\|return\)\>[?!]\@!"
|
||||
syn match scKeyword "\<\%(super\|this\|new\|yield\)\>[?!]\@!"
|
||||
syn match scBoolean "\<\%(true\|false\)\>[?!]\@!"
|
||||
syn match scControl "\<\%(case\|begin\|do\|forBy\|loop\|if\|while\|else\)\>[?!]\@!"
|
||||
|
||||
" scsynth
|
||||
syn match scArate "\v\.@<=ar(\w)@!"
|
||||
syn match scKrate "\v\.@<=kr(\w)@!"
|
||||
|
||||
" operators
|
||||
syn keyword scUnaryoperator neg reciprocal abs floor ceil frac sign squared cubed sqrt exp midicps cpsmidi midiratio ratiomidi dbamp ampdb octcps cpsoct log log2 log10 sin cos tan asin acos atan sinh cosh tanh distort softclip isPositive isNegative isStrictlyPositive
|
||||
syn keyword scBinaryoperator min max round trunc atan2 hypot hypotApx ring1 ring2 ring3 ring4 sumsqr difsqr sqrsum sqrdif absdif thresh amclip scaleneg clip2 wrap2 fold2 excess + - *
|
||||
|
||||
syn match scBinaryoperator "+"
|
||||
syn match scBinaryoperator "-"
|
||||
syn match scBinaryoperator "*"
|
||||
syn match scBinaryoperator "/"
|
||||
syn match scBinaryoperator "%"
|
||||
syn match scBinaryoperator "\*\*"
|
||||
syn match scBinaryoperator "<"
|
||||
syn match scBinaryoperator "<="
|
||||
syn match scBinaryoperator ">"
|
||||
syn match scBinaryoperator "<>"
|
||||
syn match scBinaryoperator ">="
|
||||
syn match scBinaryoperator "="
|
||||
syn match scBinaryoperator "=="
|
||||
syn match scBinaryoperator "==="
|
||||
syn match scBinaryoperator "!="
|
||||
syn match scBinaryoperator "!=="
|
||||
syn match scBinaryoperator "&"
|
||||
syn match scBinaryoperator "|"
|
||||
syn match scBinaryoperator "<!"
|
||||
syn match scBinaryoperator "?"
|
||||
syn match scBinaryoperator "??"
|
||||
syn match scBinaryoperator "!?"
|
||||
syn match scBinaryoperator "!"
|
||||
syn match scBinaryoperator "#"
|
||||
syn match scBinaryoperator "_"
|
||||
syn match scBinaryoperator "\.\."
|
||||
syn match scBinaryoperator "\.\.\."
|
||||
syn match scBinaryoperator "`"
|
||||
syn match scBinaryoperator ":"
|
||||
|
||||
" comments
|
||||
syn keyword scCommentTodo TODO FIXME XXX TBD contained
|
||||
syn match scLineComment "\/\/.*" contains=@Spell,scCommentTodo
|
||||
syn region scComment start="/\*" end="\*/" contains=@Spell,scCommentTodo
|
||||
|
||||
|
||||
" object syntax file is regenerated on startup
|
||||
runtime! syntax/supercollider_objects.vim
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""
|
||||
" linkage
|
||||
|
||||
hi def link scObject Identifier
|
||||
hi def link scBinaryoperator Special
|
||||
hi def link scUnaryoperator Special
|
||||
hi def link scAoperator Statement
|
||||
hi def link scArate Statement
|
||||
hi def link scKrate Statement
|
||||
hi def link scSymbol Constant
|
||||
hi def link scString String
|
||||
hi def link scChar String
|
||||
hi def link scInteger Number
|
||||
hi def link scInfinity Number
|
||||
hi def link scFloat Float
|
||||
hi def link scGlobVariable Define
|
||||
hi def link scComment Comment
|
||||
hi def link scLineComment Comment
|
||||
hi def link scCommentTodo Todo
|
||||
hi def link scVar Type
|
||||
hi def link scArg Type
|
||||
hi def link scControl Statement
|
||||
hi def link scKeyword Keyword
|
||||
hi def link scBoolean Boolean
|
||||
|
||||
let b:current_syntax = "supercollider"
|
|
@ -60,6 +60,9 @@ super + {F1,F2,F3,F4}
|
|||
ctrl + alt + x
|
||||
xkill
|
||||
|
||||
ctrl + alt + l
|
||||
xset s activate
|
||||
|
||||
Print
|
||||
pantallazo
|
||||
|
||||
|
|
|
@ -84,16 +84,12 @@ bind-key k select-pane -U
|
|||
bind-key j select-pane -D
|
||||
bind-key h select-pane -L
|
||||
bind-key l select-pane -R
|
||||
bind-key M-S-Up resize-pane -U
|
||||
bind-key M-S-Down resize-pane -D
|
||||
bind-key M-S-Left resize-pane -L
|
||||
bind-key M-S-Right resize-pane -R
|
||||
bind-key M-Up swap-pane -s :. -t :.- \; select-pane -t :.-
|
||||
bind-key M-Down swap-pane -s :. -t :.+ \; select-pane -t :.+
|
||||
bind-key M-S-Up swap-pane -s :. -t :.- \; select-pane -t :.-
|
||||
bind-key M-S-Down swap-pane -s :. -t :.+ \; select-pane -t :.+
|
||||
|
||||
# Ventanas
|
||||
bind-key C-Left previous-window
|
||||
bind-key C-Right next-window
|
||||
bind-key C-j previous-window
|
||||
bind-key C-k next-window
|
||||
bind-key C-Up swap-window -t :-1 -d
|
||||
bind-key C-Down swap-window -t :+1 -d
|
||||
bind-key Tab choose-window
|
||||
|
|
|
@ -1 +1 @@
|
|||
[ -z $DISPLAY ] && [ "$(fgconsole)" -eq 1 ] && exec startx -- -keeptty -nolisten tcp
|
||||
[ -z $DISPLAY ] && [ "$(fgconsole)" -eq 1 ] && exec startx "$XDG_CONFIG_HOME/X11/xinitrc" -- -keeptty -nolisten tcp
|
||||
|
|
|
@ -108,3 +108,4 @@ echo -ne '\e[5 q'
|
|||
preexec() { echo -ne '\e[6 q' ;}
|
||||
# }}}
|
||||
# vim:foldmethod=marker:foldlevel=0
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ alias \
|
|||
z='zathura' \
|
||||
py='python ' \
|
||||
pyserv='python -m http.server' \
|
||||
git='lab' \
|
||||
irc='catgirl freenode'
|
||||
|
||||
# XBPS
|
||||
alias \
|
||||
xk='xbps-query' \
|
||||
|
@ -23,15 +25,15 @@ alias \
|
|||
|
||||
# Tmux
|
||||
alias \
|
||||
ta='tmux attach -t' \
|
||||
tn='tmux new-session -s' \
|
||||
tk='tmux kill-session -t' \
|
||||
txa='tmux attach -t' \
|
||||
txn='tmux new-session -s' \
|
||||
txk='tmux kill-session -t' \
|
||||
|
||||
# LaTeX
|
||||
alias \
|
||||
txs='tlmgr search --global' \
|
||||
txl='tlmgr search' \
|
||||
txi='sudo tlmgr install'
|
||||
lxs='tlmgr search --global' \
|
||||
lxl='tlmgr search' \
|
||||
lxi='sudo tlmgr install'
|
||||
|
||||
# Transmission
|
||||
alias \
|
||||
|
@ -39,21 +41,11 @@ alias \
|
|||
ts='transmission-remote' \
|
||||
tsl='transmission-remote --list' \
|
||||
|
||||
# Git
|
||||
alias \
|
||||
git='lab' \
|
||||
gst='git status' \
|
||||
gca='git commit -a -m' \
|
||||
gu='git add -vu' \
|
||||
gc='git add --all && git commit -m' \
|
||||
gp='git push'
|
||||
|
||||
# Dotfiles
|
||||
alias \
|
||||
hxa='hx add -v' \
|
||||
hxu='hx add -vu && hx commit -m' \
|
||||
hxp='hx push' \
|
||||
hxc='hx commit -m' \
|
||||
hxs='hx status' \
|
||||
hxl='hx log --stat' \
|
||||
hxd='hx rm -r --cached' \
|
||||
|
@ -78,7 +70,6 @@ alias \
|
|||
ls='ls -AFpt --color=always --group-directories-first' \
|
||||
grep='grep --color=tty -d skip' \
|
||||
dmesg='dmesg --color=always' \
|
||||
dir='dir --color=always' \
|
||||
vsv='sudo vsv -c yes' \
|
||||
|
||||
# Con opciones por defecto
|
||||
|
@ -91,7 +82,6 @@ alias \
|
|||
du='du -sh' \
|
||||
ping='ping -c 5' \
|
||||
dd='dd status=progress' \
|
||||
dirs='dirs -v -p' \
|
||||
dfc='dfc -dmT' \
|
||||
strim='mpv --jack-port="OBS Jack Input"'
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ setopt ALWAYS_TO_END # Move cursor to the end of a completed word.
|
|||
setopt PATH_DIRS # Perform path search even on command names with slashes.
|
||||
setopt AUTO_MENU # Show completion menu on a successive tab press.
|
||||
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
||||
setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a trailing slash.
|
||||
setopt EXTENDED_GLOB # Needed for file modification glob modifiers with compinit
|
||||
setopt NO_NOMATCH # [default] unmatched patterns are left unchanged
|
||||
unsetopt MENU_COMPLETE # Do not autoselect the first completion entry.
|
||||
|
|
|
@ -16,7 +16,7 @@ function () {
|
|||
'dunst' '~/.config/dunst/dunstrc'
|
||||
'music' '~/.config/ncmpcpp/config'
|
||||
'tmux' '~/.config/tmux/tmux.conf'
|
||||
'xinit' '~/.xinitrc'
|
||||
'xinit' '~/.config/X11/xinitrc'
|
||||
'alias' '~/.config/zsh/aliases.zsh'
|
||||
'term' '~/.config/alacritty.yml'
|
||||
'env' '~/.zshenv'
|
||||
|
|
|
@ -15,15 +15,15 @@ img_reg=".*/(cover|front|folder|art).(jpg|jpeg|png|gif)$"
|
|||
artist_color="##a1b56c"
|
||||
song_color="##34e2e2"
|
||||
|
||||
form="<span color='$artist_color'>%artist%</span> - <span color='$song_color'>%title%</span>"
|
||||
form="<span color='$artist_color'>%artist%</span> - <span color='$song_color'>%album%</span>"
|
||||
# END CONFIG ------------------------------------------------
|
||||
|
||||
# These are some variables we need for things to work
|
||||
song="$(mpc --format %file% current)"
|
||||
songdir="$music_dir/$(dirname "${song}")/"
|
||||
raw_cover="/tmp/current_cover.png"
|
||||
heading="$(mpc current -f "%album%" | sed "s:&:&:g")"
|
||||
message="$(mpc current -f "$form" | sed "s:&:&:g" )"
|
||||
heading="$(mpc current -f "%title%" | sed "s:&:&:g")"
|
||||
message="$(mpc current -f "$form" | sed "s:&:&:g")"
|
||||
|
||||
# Is there music on?
|
||||
[ -z "$song" ] && exit 1
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<li>
|
||||
<a href="https://voidlinux.org/packages">Void Packages</a>
|
||||
</li>
|
||||
<li><a href="https://docs.voidlinux.org">Void Wiki</a></li>
|
||||
<li><a href="https://docs.voidlinux.org">Void Handbook</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</article>
|
||||
|
|
5
.zshenv
5
.zshenv
|
@ -9,13 +9,9 @@ export VISUAL="$EDITOR"
|
|||
export GIT_EDITOR="$EDITOR"
|
||||
export TERMINAL="alacritty"
|
||||
export BROWSER="firefox"
|
||||
export READER="zathura"
|
||||
export VIDEO="mpv"
|
||||
export IMAGE="sxiv"
|
||||
export COLORTERM="truecolor"
|
||||
export OPENER="xdg-open"
|
||||
export PAGER="less"
|
||||
export WM="bspwm"
|
||||
export FILE="lf"
|
||||
|
||||
export GREP_COLOR="0;32"
|
||||
|
@ -31,6 +27,7 @@ export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
|
|||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
ImageMagick
|
||||
SDL-32bit
|
||||
alacritty
|
||||
alsa-firmware
|
||||
alsa-lib-devel
|
||||
|
@ -19,11 +20,13 @@ bspwm
|
|||
cadence
|
||||
catgirl
|
||||
chrony
|
||||
cpupower
|
||||
crispy-doom
|
||||
cryptsetup
|
||||
ctags
|
||||
delta
|
||||
dfc
|
||||
dracut
|
||||
dunst
|
||||
elogind
|
||||
fd
|
||||
|
@ -38,10 +41,12 @@ gcc
|
|||
git
|
||||
git-extras
|
||||
git-libsecret
|
||||
glibc-32bit
|
||||
gnome-ssh-askpass
|
||||
gnupg2
|
||||
grub-i386-efi
|
||||
grub-x86_64-efi
|
||||
gzdoom
|
||||
haveged
|
||||
highlight
|
||||
hsetroot
|
||||
|
@ -61,10 +66,14 @@ lf
|
|||
libXft-devel
|
||||
libXinerama-devel
|
||||
libfluidsynth
|
||||
libjack-32bit
|
||||
libopenal
|
||||
libressl-devel
|
||||
librsvg
|
||||
librsvg-utils
|
||||
libsndfile-devel
|
||||
libstdc++-32bit
|
||||
libva-intel-driver
|
||||
lm_sensors
|
||||
lynx
|
||||
maim
|
||||
|
@ -113,6 +122,7 @@ socklog-void
|
|||
sxhkd
|
||||
sxiv
|
||||
texlive-bin
|
||||
thermald
|
||||
timidity
|
||||
tmux
|
||||
toilet
|
||||
|
@ -122,6 +132,7 @@ unclutter-xfixes
|
|||
unrar
|
||||
unzip
|
||||
vice
|
||||
void-repo-multilib
|
||||
void-repo-nonfree
|
||||
vsv
|
||||
xbacklight
|
||||
|
@ -150,5 +161,4 @@ zathura-pdf-mupdf
|
|||
zip
|
||||
zita-ajbridge
|
||||
zsh
|
||||
zsh-completions
|
||||
zsh-syntax-highlighting
|
||||
|
|
Reference in New Issue