You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ The notes.vim plug-in for the [Vim text editor] [vim] makes it easy to manage yo
4
4
5
5
***Starting a new note:** Execute the `:Note` command to create a new buffer and load the appropriate file type and syntax
6
6
* You can also start a note with Vim commands like `:edit`, `:tabedit` and `:split` by starting the filename with `note:`, as in `:edit note:todo` (the part after `note:` doesn't have to be the complete note title and if it's empty a new note will be created)
7
-
* You can start a new note with the selected text as title in the current window using the `:NoteFromSelectedText` command (the`:SplitNoteFromSelectedText` command opens the new note in a split window)
7
+
* You can start a new note with the selected text as title in the current window using the `\en` mapping or`:NoteFromSelectedText` command (there are similar mappings and commands for opening split windows and tab pages)
8
8
***Saving notes:** Just use Vim's [:write][write] and [:update][update] commands, you don't need to provide a filename because it will be set based on the title (first line) of your note (you also don't need to worry about special characters, they'll be escaped)
9
9
***Editing existing notes:** Execute `:Note anything` to edit a note containing `anything` in its title (if no notes are found a new one is created with its title set to `anything`)
10
10
* The `:Note` and `:DeleteNote` commands support tab completion of note titles
@@ -107,14 +107,15 @@ This command will fail when changes have been made to the current buffer, unless
107
107
108
108
### The `:NoteFromSelectedText` command
109
109
110
-
Start a new note in the current window with the selected text as the title of the note. The name of this command isn't very well suited to daily use, however the idea is that users will define their own mapping to invoke this command. For example:
111
-
112
-
" Map \ns in visual mode to start new note with selected text as title.
113
-
vmap <Leader>ns :NoteFromSelectedText<CR>
110
+
Start a new note in the current window with the selected text as the title of the note. The name of this command isn't very well suited to daily use, that's because it's intended to be executed from a mapping. The default mapping for this command is `\en` (the backslash is actually the character defined by the [mapleader][mapleader] variable).
114
111
115
112
### The `:SplitNoteFromSelectedText` command
116
113
117
-
Same as `:NoteFromSelectedText` but opens the new note in a vertical split window.
114
+
Same as `:NoteFromSelectedText` but opens the new note in a vertical split window. The default mapping for this command is `\sn`.
115
+
116
+
### The `:TabNoteFromSelectedText` command
117
+
118
+
Same as `:NoteFromSelectedText` but opens the new note in a new tab page. The default mapping for this command is `\tn`.
118
119
119
120
### The `:DeleteNote` command
120
121
@@ -192,6 +193,9 @@ The following key mappings are defined inside notes.
192
193
*`Tab` and `Alt-Right` increase indentation of list items (works on the current line and selected lines)
193
194
*`Shift-Tab` and `Alt-Left` decrease indentation of list items
194
195
*`Enter` on a line with only a list bullet removes the bullet and starts a new line below the current line
196
+
*`\en` executes `:NoteFromSelectedText`
197
+
*`\sn` executes `:SplitNoteFromSelectedText`
198
+
*`\tn` executes `:TabNoteFromSelectedText`
195
199
196
200
## Customizing the syntax highlighting of notes
197
201
@@ -273,6 +277,7 @@ This software is licensed under the [MIT license] [mit].
0 commit comments