dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 05eec4a581aa2d681b89e33c26c6b54e81a07b28
parent 646e09214afc02c747ab411612ff8365e66e5f1d
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sun, 17 Feb 2019 14:35:18 +0100

Allow custom functions to abort


Former-commit-id: 3d9f247c69be8171b0a7d2407ebdefd2df58d63d
Diffstat:
Mvim/commands.vimrc | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vim/commands.vimrc b/vim/commands.vimrc @@ -22,7 +22,7 @@ command! -nargs=1 -complete=command Redir silent call Redir(<f-args>) " :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window " Functions -function! InsertTabWrapper() +function! InsertTabWrapper() abort let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\<tab>" @@ -31,7 +31,7 @@ function! InsertTabWrapper() endif endfunction -function! ToggleNumber() +function! ToggleNumber() abort if(&relativenumber == 1) set norelativenumber set number @@ -40,7 +40,7 @@ function! ToggleNumber() endif endfunc -function! Redir(cmd) +function! Redir(cmd) abort for win in range(1, winnr('$')) if getwinvar(win, 'scratch') execute win . 'windo close'