Skip to content

Commit

Permalink
write markdown snippets in Ultisnips
Browse files Browse the repository at this point in the history
  • Loading branch information
tanloong committed Nov 19, 2022
1 parent 4239689 commit 3a2d9ba
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 14 deletions.
63 changes: 63 additions & 0 deletions Ultisnips/markdown.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,66 @@ snippet tr "Table Row"
| ${1:Term} | ${2:Definition} |
${0}
endsnippet

snippet ,n "Horizontal line" bA
---

$0
endsnippet

snippet ,b "Bold" wA
**$0** <++>
endsnippet

snippet ,s "Strikethrough" wA
~~$0~~ <++>
endsnippet

snippet ,i "Italic" wA
*$0* <++>
endsnippet

snippet ,d "Code" wA
`$0` <++>
endsnippet

snippet ,c "Code block" bA
```$0
<++>
```

<++>
endsnippet

snippet ,m "Task list" bA
- [ ] $0
endsnippet

snippet ,p "Images" wA
![$0](<++>) <++>
endsnippet

snippet ,a "Inline links" wA
[$0](<++>) <++>
endsnippet

snippet ,1 "h1" bA
# $0
<++>
endsnippet
snippet ,2 "h2" bA
## $0
<++>
endsnippet
snippet ,3 "h3" bA
### $0
<++>
endsnippet
snippet ,4 "h4" bA
#### $0
<++>
endsnippet
snippet ,l "Long horizontal line" bA
--------
$0
endsnippet
14 changes: 0 additions & 14 deletions md-snippets.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,3 @@
autocmd Filetype markdown inoremap <buffer> ,f <Esc>/<++><CR>:nohlsearch<CR>"_c4l
autocmd Filetype markdown inoremap <buffer> <c-e> <Esc>/<++><CR>:nohlsearch<CR>"_c4l
autocmd Filetype markdown inoremap <buffer> ,w <Esc>/ <++><CR>:nohlsearch<CR>"_c5l<CR>
autocmd Filetype markdown inoremap <buffer> ,n ---<Enter><Enter>
autocmd Filetype markdown inoremap <buffer> ,b **** <++><Esc>F*hi
autocmd Filetype markdown inoremap <buffer> ,s ~~~~ <++><Esc>F~hi
autocmd Filetype markdown inoremap <buffer> ,i ** <++><Esc>F*i
autocmd Filetype markdown inoremap <buffer> ,d `` <++><Esc>F`i
autocmd Filetype markdown inoremap <buffer> ,c ```<Enter><++><Enter>```<Enter><Enter><++><Esc>4kA
autocmd Filetype markdown inoremap <buffer> ,m - [ ]
autocmd Filetype markdown inoremap <buffer> ,p ![](<++>) <++><Esc>F[a
autocmd Filetype markdown inoremap <buffer> ,a [](<++>) <++><Esc>F[a
autocmd Filetype markdown inoremap <buffer> ,1 #<Space><Enter><++><Esc>kA
autocmd Filetype markdown inoremap <buffer> ,2 ##<Space><Enter><++><Esc>kA
autocmd Filetype markdown inoremap <buffer> ,3 ###<Space><Enter><++><Esc>kA
autocmd Filetype markdown inoremap <buffer> ,4 ####<Space><Enter><++><Esc>kA
autocmd Filetype markdown inoremap <buffer> ,l --------<Enter>

0 comments on commit 3a2d9ba

Please sign in to comment.