Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Include the ftdetect/notes.vim script (thanks Avi Yagodnick, sorry ev…

…eryone else :-)
  • Loading branch information...
commit b16493f8a934787d726243bbdc1b57310b600834 1 parent 1099756
@xolox authored
Showing with 18 additions and 2 deletions.
  1. +2 −2 autoload/xolox/notes.vim
  2. +16 −0 ftdetect/notes.vim
View
4 autoload/xolox/notes.vim
@@ -1,12 +1,12 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: November 26, 2011
+" Last Change: November 27, 2011
" URL: http://peterodding.com/code/vim/notes/
" Note: This file is encoded in UTF-8 including a byte order mark so
" that Vim loads the script using the right encoding transparently.
-let g:xolox#notes#version = '0.16.11'
+let g:xolox#notes#version = '0.16.12'
let s:scriptdir = expand('<sfile>:p:h')
function! xolox#notes#init() " {{{1
View
16 ftdetect/notes.vim
@@ -0,0 +1,16 @@
+" Vim file type detection script
+" Author: Peter Odding <peter@peterodding.com>
+" Last Change: November 26, 2011
+" URL: http://peterodding.com/code/vim/notes
+
+" Initialize the configuration defaults.
+call xolox#notes#init()
+
+" Define the automatic commands used to recognize notes.
+for s:directory in [g:notes_directory, g:notes_shadowdir]
+ execute 'autocmd BufNewFile,BufRead'
+ \ xolox#notes#autocmd_pattern(s:directory)
+ \ 'if empty(&buftype) | setlocal filetype=notes | endif'
+endfor
+
+" vim: ts=2 sw=2 et
Please sign in to comment.
Something went wrong with that request. Please try again.