Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug fix: Make <Tab> work on empty lines (reported by Ulrik Sverdrup)

  • Loading branch information...
commit c4f231e6d920d17901a32d43a4b64415a5af5f44 1 parent d863547
@xolox authored
Showing with 9 additions and 5 deletions.
  1. +8 −4 autoload/xolox/notes.vim
  2. +1 −1  plugin/notes.vim
View
12 autoload/xolox/notes.vim
@@ -1,6 +1,6 @@
" Vim auto-load script
" Author: Peter Odding <peter@peterodding.com>
-" Last Change: May 2, 2011
+" Last Change: May 22, 2011
" URL: http://peterodding.com/code/vim/notes/
" Note: This file is encoded in UTF-8 including a byte order mark so
@@ -406,9 +406,13 @@ endfunction
function! xolox#notes#indent_list(command, line1, line2) " {{{3
" Change indent of list items from {line1} to {line2} using {command}.
- execute a:line1 . ',' . a:line2 . 'normal' a:command
- if getline('.') =~ '•$'
- call setline('.', getline('.') . ' ')
+ if a:line1 == a:line2 && getline(a:line1) == ''
+ call setline(a:line1, repeat(' ', &tabstop))
+ else
+ execute a:line1 . ',' . a:line2 . 'normal' a:command
+ if getline('.') =~ '•$'
+ call setline('.', getline('.') . ' ')
+ endif
endif
normal $
endfunction
View
2  plugin/notes.vim
@@ -3,7 +3,7 @@
" Last Change: May 22, 2011
" URL: http://peterodding.com/code/vim/notes/
" License: MIT
-" Version: 0.8.3
+" Version: 0.8.4
" Support for automatic update using the GLVS plug-in.
" GetLatestVimScripts: 3375 1 :AutoInstall: notes.zip
Please sign in to comment.
Something went wrong with that request. Please try again.