Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Download & Vim scripts links, automatic updates, to-do list

  • Loading branch information...
commit c16227bbf3855c27344e15885b7e997f984e6f36 1 parent adc41b0
Peter Odding authored
4 README.md
View
@@ -14,11 +14,11 @@ The `notes.vim` plug-in for the [Vim text editor](http://www.vim.org/) makes it
## Install & usage
-Unzip the most recent ZIP archive file inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). To get started execute `:NewNote`.
+Unzip the most recent [ZIP archive](http://peterodding.com/code/vim/downloads/notes) file inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). To get started execute `:NewNote`.
## Contact
-If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/notes/> and <http://github.com/xolox/vim-notes>.
+If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/notes/> and <http://github.com/xolox/vim-notes>. If you like the script please vote for it on [Vim Online](http://www.vim.org/scripts/script.php?script_id=3375).
## License
5 TODO.md
View
@@ -0,0 +1,5 @@
+# To-do list for the `notes.vim` plug-in
+
+ * Add a key mapping or command to toggle the visibility of `{{{ … }}}` code markers?
+ * Find a good way to support notes with generates contents, e.g. *'all notes'*.
+ * Automatically rename notes on disk when their titles change?!
12 autoload.vim
View
@@ -381,13 +381,7 @@ function! xolox#notes#insert_quote(style) " {{{3
" XXX When I pass the below string constants as arguments from the file type
" plug-in the resulting strings contain mojibake (UTF-8 interpreted as
" latin1?) even if both scripts contain a UTF-8 BOM! Maybe a bug in Vim?!
- if a:style == 1
- let open_quote = '‘'
- let close_quote = '’'
- else
- let open_quote = '“'
- let close_quote = '”'
- endif
+ let [open_quote, close_quote] = a:style == 1 ? ['‘', '’'] : ['“', '”']
return getline('.')[col('.')-2] =~ '\S$' ? close_quote : open_quote
endfunction
@@ -406,7 +400,7 @@ function! xolox#notes#indent_list(command, line1, line2) " {{{3
endfunction
function! xolox#notes#highlight_names(group) " {{{3
- " Syntax highlight the names of all of the user's notes.
+ " Highlight the names of all notes as {group}.
let starttime = xolox#timer#start()
let titles = filter(xolox#notes#get_titles(), '!empty(v:val)')
call map(titles, 's:words_to_pattern(v:val)')
@@ -467,7 +461,7 @@ function! s:syntax_include(filetype)
return grouplistname
endfunction
-function! xolox#notes#cfile(interactive, fname) " {{{3
+function! xolox#notes#include_expr(fname) " {{{3
" Translate string {fname} to absolute filename of note.
" TODO Use inputlist() when more than one note matches?!
let notes = copy(xolox#notes#get_fnames_and_titles())
4 filetype.vim
View
@@ -1,6 +1,6 @@
" Vim file type plug-in
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: December 21, 2010
+" Last Change: December 22, 2010
" URL: http://peterodding.com/code/vim/notes/
if exists('b:did_ftplugin')
@@ -43,7 +43,7 @@ if has('conceal')
endif
" Change <cfile> to jump to notes by name. {{{1
-setlocal includeexpr=xolox#notes#cfile(1,v:fname)
+setlocal includeexpr=xolox#notes#include_expr(v:fname)
let b:undo_ftplugin .= ' includeexpr<'
" Change double-dash to em-dash as it is typed. {{{1
5 notes.vim
View
@@ -3,7 +3,10 @@
" Last Change: December 22, 2010
" URL: http://peterodding.com/code/vim/notes/
" License: MIT
-" Version: 0.7.4
+" Version: 0.7.5
+
+" Support for automatic update using the GLVS plug-in.
+" GetLatestVimScripts: 3375 1 :AutoInstall: session.zip
" Don't source the plug-in when its already been loaded or &compatible is set.
if &cp || exists('g:loaded_notes')
4 syntax.vim
View
@@ -1,6 +1,6 @@
" Vim syntax script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: December 21, 2010
+" Last Change: December 22, 2010
" URL: http://peterodding.com/code/vim/notes/
" Note: This file is encoded in UTF-8 including a byte order mark so
@@ -132,4 +132,4 @@ highlight def link notesModeLine LineNr
" Set the currently loaded syntax mode.
let b:current_syntax = 'notes'
-" vim: ts=2 sw=2 et bomb
+" vim: ts=2 sw=2 et bomb fdl=1
Please sign in to comment.
Something went wrong with that request. Please try again.