diff options
author | luxagraf <sng@luxagraf.net> | 2024-10-09 16:00:11 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2024-10-09 16:00:11 -0500 |
commit | d2e87e2d9f8ee2fd014087dafdc8c7cbd229a088 (patch) | |
tree | e7dfff8ec923c7e7b0aa8b1a2776f15fb057cf58 /.vimrc | |
parent | eecedc09e7be82fd80460e268e3746c33a613602 (diff) |
switched to alacritty and updated some shell scripts and w3m config
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -59,6 +59,7 @@ autocmd BufLeave,FocusLost * silent! wall let g:auto_save = 1 let g:auto_save_in_insert_mode = 0 "}}} + " Abbreviations {{{ " easier markdown links: @@ -113,6 +114,20 @@ noremap <C-l> <C-w>l inoremap <F5> <C-R>=strftime("%Y-%m-%d")<CR> +nmap ,t yiw:call AddTag('<C-R>"')<CR> +vmap ,t y:call AddTag('<C-R>"')<CR> + +function! AddTag(tagname) + let tagname = input('Tag name: ', a:tagname, 'tag') + let tagfile = expand('%:p') + let tagaddress = input('Address: ', '/\<' . a:tagname . '\>/') + if (tagname == '' || tagaddress == '') + return + endif + let cmd = '!echo -e "' . tagname . '\t' . tagfile . '\t' . tagaddress . '" >> ' . $HOME . '/.tags.global' + execute cmd +endfunction + " Convert curly quotes to straight. {{{ " Any argument causes substitute to confirm changes. function! ToStraight(line1, line2, args) |