css-regions = true
hyperlink-auditing = false
geolocation = ask
-notifications = ask
+notifications = false
media-capture = ask
javascript-can-open-windows-automatically = false
javascript-can-close-windows = false
mode = letter
chars = aoeuidhtns
min-chars = 2
-scatter = true
+scatter = false
uppercase = true
dictionary = /usr/share/dict/words
auto-follow = unique-match
quit = close
q = close
exit = quit
+mpv = spawn --userscript ~/src/qutebrowser/misc/userscripts/view_in_mpv
[colors]
# Colors used in the UI.
[Service]
Type=forking
-Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
+PassEnvironment=SSH_AUTH_SOCK
ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK -t 1h
[Install]
au BufEnter *.cpp let b:fswitchlocs = 'reg:|source|include/**|'
augroup END
+let g:switch_const_definitions =
+ \ [ {
+ \ '\%(const \)\@!\([[:alnum:]_:<>]\{-}\) \%(&\)\@!': 'const \1 ',
+ \ 'const \([[:alnum:]_:<>]\{-}\) &\@!': 'const \1 &' ,
+ \ 'const \([[:alnum:]_:<>]\{-}\) &': '\1 '
+ \ } ]
+
+nnoremap <buffer> <leader>c :call switch#Switch(g:switch_const_definitions, {})<cr>
+
nnoremap <buffer> gd :YcmCompleter GoTo<CR>
nnoremap <buffer> <C-W>d :vs<CR>:YcmCompleter GoTo<CR>
+" format with =
+map <buffer> = <Plug>(operator-clang-format)
+vnoremap <buffer> = :ClangFormat<CR>
+" restore = mapping to g=
+nnoremap <buffer>g= =
+vnoremap <buffer>g= =
+
+setlocal errorformat=
+setlocal errorformat+=%f:%l:%c:\ %trror:\ %m
+setlocal errorformat+=%f:%l:%c:\ %tarning:\ %m
+setlocal errorformat+=%D%*\\a[%*\\d]:\ Entering\ directory\ [`']%f'
+setlocal errorformat+=%X%*\\a[%*\\d]:\ Leaving\ directory\ [`']%f'
+setlocal errorformat+=%D%*\\a:\ Entering\ directory\ [`']%f'
+setlocal errorformat+=%X%*\\a:\ Leaving\ directory\ [`']%f'
+setlocal errorformat+=%*[^[]\[%tRROR\]%m\ \[%f:%l\]
+setlocal errorformat+=%*[^[]\[%tARNING\]%m\ \[%f:%l\]
+
setlocal foldmethod=syntax
" set foldlevel according to number of matches of 'namespace' and 'class' not
" containing ';'
setlocal indentexpr=GoogleCppIndent()
let b:undo_indent = "setl sw< ts< sts< et< tw< wrap< cin< cino< inde<"
+
+setlocal textwidth=100
#
# Qt
#
+global !p
+def align(base, a, pad=' '):
+ amount = abs(len(base) - len(a))
+ return amount * pad if len(base) < len(a) else ''
+endglobal
+
snippet connect "Qt connect()" b
-connect(${1:this}, SIGNAL(${2:signal()}),
- ${3:this}, SLOT(${4:slot()}));
+connect(${1:this}, `!p snip.rv = align(t[1],t[3])`&${2:class::function},
+ ${3:this}, `!p snip.rv = align(t[3],t[1])`&${4:class::function});
+${0}
endsnippet
snippet connectl "Qt connect() lambda" b
Plugin 'vim-latex/vim-latex'
Plugin 'alx741/vinfo'
Plugin 'derekwyatt/vim-protodef'
+Plugin 'ram-z/vim-clang-format'
+Plugin 'sgeb/vim-diff-fold'
" needs editing colorscheme
" Plugin 'jeaye/color_coded'
" Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp
" open folds when jumping to line
set foldopen+=jump
-" save and restore folds
-set viewoptions=cursor " only save cursor position
+set viewoptions=cursor " save cursor position
+set viewoptions+=folds " save folds
" diff mode {{{2
set diffopt+=filler " show filler lines
nnoremap ]oe :set noexpandtab<CR>
for idt in range(1,8)
- exe 'nnoremap co'.idt.' :set tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'<CR>'
+ exe 'nnoremap co'.idt.' :setlocal tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'<CR>'
endfor
" toggle auto format of text
+++ /dev/null
-# Return if requirements are not found.
-if (( ! $+commands[envoy] )); then
- return 1
-fi
-
-if ! envoy -l >/dev/null ; then
- alias ssh='envoy -a && unalias ssh; ssh'
-fi
-source <(envoy -p)
# gpg
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
+# ssh
+export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
if hash systemctl 2>/dev/null; then
systemctl --user import-environment \
XDG_CACHE_HOME \
XDG_CONFIG_HOME \
XDG_DATA_HOME \
- GNUPGHOME
+ GNUPGHOME \
+ SSH_AUTH_SOCK
fi
# vim stuff