Skip to content
This repository was archived by the owner on Mar 5, 2020. It is now read-only.

Commit f421baa

Browse files
arp242joereynolds
authored andcommitted
Add ftdetect (#13)
* Add ftdetect Fixes #3 * Add "for syntax highlighting" Also add modeline to help file; almost all help files have this, and it makes editing them a lot easier imho.
1 parent 3c6338b commit f421baa

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

doc/minisnip.txt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ CONFIGURATION *minisnip-configuration*
5353
Default: '~/.vim/minisnip'
5454

5555
A colon-separated list of directories to look for snippet files, similar to
56-
$PATH. The first match will be used. For example to share system-wide
57-
snippets: >
56+
`$PATH`. The first match will be used.
57+
58+
For example to share system-wide snippets: >
5859
let g:minisnip_dir = '/usr/share/minisnip:~/.vim/minisnip'
5960
<
61+
Minisnip adds the `minisnip` |filetype| for syntax highlighting to all files
62+
matching `*/minisnip/*`. If you store your snippets in another directory then
63+
you'll have to create your own |autocmd| to do this.
6064

6165
-------------------------------------------------------------------------------
6266
*'g:minisnip_trigger'*
@@ -113,14 +117,5 @@ of how it can be used: >
113117
This will automatically fill the `#define` line with the value entered on the
114118
`#ifndef` line upon jumping to it.
115119

116-
===============================================================================
117-
MISCELLANEOUS *minisnip-miscellaneous*
118-
119-
-------------------------------------------------------------------------------
120-
121-
Syntax highlighting for minisnips:
122120

123-
If you would like to have the minisnip delimiters highlighted for better
124-
visibility in your minisnip files, add the following to your `.vimrc`: >
125-
autocmd BufRead,BufNewFile */minisnip/_* setlocal filetype=minisnip
126-
<
121+
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:

ftdetect/minisnip.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
" Assume that everything in a "minisnip" directory is a snippet.
2+
autocmd BufRead,BufNewFile */minisnip/* setlocal filetype=minisnip

0 commit comments

Comments
 (0)