From 57f3fd3a3b87a735e1f8e521acf59eef6aa000c5 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 26 Jun 2014 09:14:16 -0400 Subject: [PATCH] J only formats the current line in normal mode (rather than the whole document) --- vim/config/keyboard.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 1720638..3decfaa 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -498,7 +498,7 @@ vnoremap "_x "formatting options to apply to the whole document - nnoremap J ':set tw=79gggqG:set tw=0:echo "Document text has been formatted to a width of 79 characters"' + nnoremap J ':set tw=79Vgq:set tw=0:echo "Document text has been formatted to a width of 79 characters"' vnoremap J ':set tw=79gvgq:set tw=0:echo "Selected text has been formatted to a width of 79 characters"' nnoremap f mzgg=G`z:echo "The document has been formatted" vnoremap f mz=`z:echo "The selection has been formatted"