Skip to content
This repository
Browse code

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

  • Loading branch information...
commit c16227bbf3855c27344e15885b7e997f984e6f36 1 parent adc41b0
Peter Odding authored December 22, 2010
4  README.md
Source Rendered
@@ -14,11 +14,11 @@ The `notes.vim` plug-in for the [Vim text editor](http://www.vim.org/) makes it
14 14
 
15 15
 ## Install & usage
16 16
 
17  
-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`.
  17
+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`.
18 18
 
19 19
 ## Contact
20 20
 
21  
-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>.
  21
+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).
22 22
 
23 23
 ## License
24 24
 
5  TODO.md
Source Rendered
... ...
@@ -0,0 +1,5 @@
  1
+# To-do list for the `notes.vim` plug-in
  2
+
  3
+ * Add a key mapping or command to toggle the visibility of `{{{ … }}}` code markers?
  4
+ * Find a good way to support notes with generates contents, e.g. *'all notes'*.
  5
+ * Automatically rename notes on disk when their titles change?!
12  autoload.vim
@@ -381,13 +381,7 @@ function! xolox#notes#insert_quote(style) " {{{3
381 381
   " XXX When I pass the below string constants as arguments from the file type
382 382
   " plug-in the resulting strings contain mojibake (UTF-8 interpreted as
383 383
   " latin1?) even if both scripts contain a UTF-8 BOM! Maybe a bug in Vim?!
384  
-  if a:style == 1
385  
-    let open_quote = '‘'
386  
-    let close_quote = '’'
387  
-  else
388  
-    let open_quote = '“'
389  
-    let close_quote = '”'
390  
-  endif
  384
+  let [open_quote, close_quote] = a:style == 1 ? ['‘', '’'] : ['“', '”']
391 385
   return getline('.')[col('.')-2] =~ '\S$' ? close_quote : open_quote
392 386
 endfunction
393 387
 
@@ -406,7 +400,7 @@ function! xolox#notes#indent_list(command, line1, line2) " {{{3
406 400
 endfunction
407 401
 
408 402
 function! xolox#notes#highlight_names(group) " {{{3
409  
-  " Syntax highlight the names of all of the user's notes.
  403
+  " Highlight the names of all notes as {group}.
410 404
   let starttime = xolox#timer#start()
411 405
   let titles = filter(xolox#notes#get_titles(), '!empty(v:val)')
412 406
   call map(titles, 's:words_to_pattern(v:val)')
@@ -467,7 +461,7 @@ function! s:syntax_include(filetype)
467 461
   return grouplistname
468 462
 endfunction
469 463
 
470  
-function! xolox#notes#cfile(interactive, fname) " {{{3
  464
+function! xolox#notes#include_expr(fname) " {{{3
471 465
   " Translate string {fname} to absolute filename of note.
472 466
   " TODO Use inputlist() when more than one note matches?!
473 467
   let notes = copy(xolox#notes#get_fnames_and_titles())
4  filetype.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim file type plug-in
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: December 21, 2010
  3
+" Last Change: December 22, 2010
4 4
 " URL: http://peterodding.com/code/vim/notes/
5 5
 
6 6
 if exists('b:did_ftplugin')
@@ -43,7 +43,7 @@ if has('conceal')
43 43
 endif
44 44
 
45 45
 " Change <cfile> to jump to notes by name. {{{1
46  
-setlocal includeexpr=xolox#notes#cfile(1,v:fname)
  46
+setlocal includeexpr=xolox#notes#include_expr(v:fname)
47 47
 let b:undo_ftplugin .= ' includeexpr<'
48 48
 
49 49
 " Change double-dash to em-dash as it is typed. {{{1
5  notes.vim
@@ -3,7 +3,10 @@
3 3
 " Last Change: December 22, 2010
4 4
 " URL: http://peterodding.com/code/vim/notes/
5 5
 " License: MIT
6  
-" Version: 0.7.4
  6
+" Version: 0.7.5
  7
+
  8
+" Support for automatic update using the GLVS plug-in.
  9
+" GetLatestVimScripts: 3375 1 :AutoInstall: session.zip
7 10
 
8 11
 " Don't source the plug-in when its already been loaded or &compatible is set.
9 12
 if &cp || exists('g:loaded_notes')
4  syntax.vim
... ...
@@ -1,6 +1,6 @@
1 1
 " Vim syntax script
2 2
 " Author: Peter Odding <peter@peterodding.com>
3  
-" Last Change: December 21, 2010
  3
+" Last Change: December 22, 2010
4 4
 " URL: http://peterodding.com/code/vim/notes/
5 5
 
6 6
 " Note: This file is encoded in UTF-8 including a byte order mark so
@@ -132,4 +132,4 @@ highlight def link notesModeLine LineNr
132 132
 " Set the currently loaded syntax mode.
133 133
 let b:current_syntax = 'notes'
134 134
 
135  
-" vim: ts=2 sw=2 et bomb
  135
+" vim: ts=2 sw=2 et bomb fdl=1

0 notes on commit c16227b

Please sign in to comment.
Something went wrong with that request. Please try again.