Browse Source

Start abbreviations with ":"

master
Julio Biason 4 years ago
parent
commit
7357bc2eec
  1. 5
      nvim/init.vim

5
nvim/init.vim

@ -39,15 +39,16 @@ let g:rustfmt_autosave = 1
" Markdown {{{
augroup markdown
au FileType markdown setlocal iskeyword+=: " this is kinda of a "hack" to make abbr accept ":" in them
" This is a long abbreviation, but:
" Most of it is simply text, with linebreaks (<CR>).
" There is one thing to take care, though: <CR> is NOT <C-R>.
" <C-R> will call the function (strftime), which will insert the current
" date.
au FileType markdown iab <silent> headr +++<CR>title = ""<CR>date = <C-R>=strftime('%Y-%m-%d')<CR><CR><CR>[taxonomies]<CR>tags = [""]<CR>+++
au FileType markdown iab <silent> :header +++<CR>title = ""<CR>date = <C-R>=strftime('%Y-%m-%d')<CR><CR><CR>[taxonomies]<CR>tags = [""]<CR>+++
" This abbreviation adds a modeline to set VIM to change the spell
" lang to portuguese.
au FileType markdown iab langpt <!--<CR>vim:spelllang=pt:<CR>-->
au FileType markdown iab :pt <!--<CR>vim:spelllang=pt:<CR>-->
au FileType markdown setlocal spell " enable spell checking
au FileType markdown setlocal textwidth=79 " max line size

Loading…
Cancel
Save