Permalink
Browse files

Exclude "anonymous" swap files in search-notes.py (.s??)

  • Loading branch information...
1 parent 9933c4f commit 8881d4181c6ce6531cd7202b7600e514caa94aa7 @xolox committed Jan 18, 2012
Showing with 53 additions and 6 deletions.
  1. +1 −0 TODO.md
  2. +2 −2 autoload/xolox/notes.vim
  3. +46 −2 doc/notes.txt
  4. +4 −2 misc/notes/search-notes.py
View
@@ -1,5 +1,6 @@
# To-do list for the `notes.vim` plug-in
+ * The note name highlighting uses word boundaries so that 'git' inside 'fugitive' is not highlighted, however this breaks highlighting of note names ending in punctuation (or more generically ending in non-word characters).
* The `ftplugin/notes.vim` script used to clear the [matchpairs] [matchpairs] option so that pairs of characters are not highlighted in notes (the irrelevant highlighting was starting to annoy me). Several people have since complained that Vim rings a bell or flashes the screen for every key press in insert mode when editing notes. I've now removed the matchpairs manipulation from the plug-in but I suspect that this may actually be a bug in Vim; to be investigated. See also [issue 10 on GitHub] [issue_10].
* Override `<F1>` to show a quick reference of available commands?
* Define aliases of the available commands that start with `Note` (to help people getting started with the plug-in).
@@ -1,12 +1,12 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: December 14, 2011
+" Last Change: January 18, 2012
" 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.16'
+let g:xolox#notes#version = '0.16.17'
let s:scriptdir = expand('<sfile>:p:h')
function! xolox#notes#init() " {{{1
View
@@ -1,5 +1,50 @@
*notes.txt* Easy note taking in Vim
+===============================================================================
+ *notes-contents*
+Contents ~
+
+ 1. Introduction |notes-introduction|
+ 2. Install & usage |notes-install-usage|
+ 3. Options |notes-options|
+ 1. The |g:notes_directory| option
+ 2. The |g:notes_suffix| option
+ 3. The |g:notes_title_sync| option
+ 4. The |g:notes_smart_quotes| option
+ 5. The |g:notes_ruler_text| option
+ 6. The |g:notes_list_bullets| option
+ 7. The |g:notes_shadowdir| option
+ 8. The |g:notes_indexfile| option
+ 9. The |g:notes_indexscript| option
+ 10. The |g:notes_tagsindex| option
+ 4. Commands |notes-commands|
+ 1. The |:Note| command
+ 2. The |:NoteFromSelectedText| command
+ 3. The |:SplitNoteFromSelectedText| command
+ 4. The |:TabNoteFromSelectedText| command
+ 5. The |:DeleteNote| command
+ 6. The |:SearchNotes| command
+ 1. |:SearchNotes| understands @tags
+ 2. Accelerated searching with Python |notes-accelerated-searching-with-python|
+ 7. The |:RelatedNotes| command
+ 8. The |:RecentNotes| command
+ 9. The |:ShowTaggedNotes| command
+ 10. The |:IndexTaggedNotes| command
+ 5. Mappings |notes-mappings|
+ 1. Insert mode mappings |notes-insert-mode-mappings|
+ 6. Customizing the syntax highlighting of notes
+ 7. Other plug-ins that work well with the notes plug-in
+ 1. utl.vim |notes-utl.vim|
+ 2. shell.vim |notes-shell.vim|
+ 3. VOoM |notes-voom|
+ 4. Txtfmt |notes-txtfmt|
+ 8. Contact |notes-contact|
+ 9. License |notes-license|
+
+===============================================================================
+ *notes-introduction*
+Introduction ~
+
The notes.vim plug-in for the Vim text editor makes it easy to manage your
notes in Vim:
@@ -266,7 +311,6 @@ notes containing all of the given keywords:
:SearchNotes syntax highlighting
-------------------------------------------------------------------------------
- *:searchnotes-understands-tags*
|:SearchNotes| understands @tags ~
If you don't pass any arguments to the |:SearchNotes| command it will search
@@ -360,7 +404,7 @@ Insert mode mappings ~
- '@' automatically triggers tag completion
- - ' becomes '‘' or '’' depending on where you type it
+ - '' becomes '‘' or '’' depending on where you type it
- '"' becomes '“' or '”' (same goes for these)
@@ -3,7 +3,7 @@
# Python script for fast text file searching using keyword index on disk.
#
# Author: Peter Odding <peter@peterodding.com>
-# Last Change: November 25, 2011
+# Last Change: January 18, 2012
# URL: http://peterodding.com/code/vim/notes/
# License: MIT
#
@@ -113,7 +113,9 @@ def update_index(self):
# First we find the filenames and last modified times of the notes on disk.
notes_on_disk = {}
for filename in os.listdir(self.user_directory):
- if filename != '.swp' and not fnmatch.fnmatch(filename, '.*.s??'): # (Vim swap files are ignored)
+ # Vim swap files are ignored.
+ if (filename != '.swp' and not fnmatch.fnmatch(filename, '.s??')
+ and not fnmatch.fnmatch(filename, '.*.s??')):
abspath = os.path.join(self.user_directory, filename)
if os.path.isfile(abspath):
notes_on_disk[abspath] = os.path.getmtime(abspath)

0 comments on commit 8881d41

Please sign in to comment.