dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.config/nvim/autoload/dead/functions.vim

30 lines
832 B
VimL

function! dead#functions#PopOutOfInsertMode() abort
if v:insertmode
call feedkeys("\<C-\>\<C-n>")
endif
endfunction
function! dead#functions#Relativize(v) abort
if &number
let &cursorline = a:v
endif
endfunction
function! dead#functions#JumpToNextHeading(direction, count)
let col = col(".")
silent execute a:direction == "up" ? '?^#' : '/^#'
if a:count > 1
silent execute "normal! " . repeat("n", a:direction == "up" && col != 1 ? a:count : a:count - 1)
endif
silent execute "normal! " . col . "|"
unlet col
endfunction
function! dead#functions#NewMail()
let l:path = system('mktemp --tmpdir XXXXXXXXXX.eml')
execute 'sp' l:path
" See the help for `skeleton`.
0r ~/.config/nvim/templates/correo.skeleton | w | $
endfunction
command! Mail call dead#functions#NewMail()