Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite markdown snippets in Ultisnips syntax #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions Ultisnips/markdown.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,70 @@ 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 "Image" wA
![$0](<++>) <++>
endsnippet

snippet ,a "Inline link" 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>