From 5ded6877c5c9a57499dac77c2e7ebaff5753fcaf Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 29 Jul 2014 03:04:37 -0400 Subject: [PATCH] Added the tabular plugin and mapped the mkd table format it allows --- .gitmodules | 3 +++ README.md | 1 + vim/bundle/tabular | 1 + vim/config/keyboard.vim | 3 ++- 4 files changed, 7 insertions(+), 1 deletion(-) create mode 160000 vim/bundle/tabular diff --git a/.gitmodules b/.gitmodules index c392982..5c97627 100644 --- a/.gitmodules +++ b/.gitmodules @@ -91,3 +91,6 @@ [submodule "vim/bundle/vim-fixkey"] path = vim/bundle/vim-fixkey url = https://github.com/drmikehenry/vim-fixkey.git +[submodule "vim/bundle/tabular"] + path = vim/bundle/tabular + url = https://github.com/godlygeek/tabular diff --git a/README.md b/README.md index 1ae398c..e4784d7 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l * [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister) Replace text with the contents of a register (for paste+replace without writing over the buffer). * [SudoEdit.vim](https://github.com/vim-scripts/SudoEdit.vim) Read and write files without the necessary permissions through the use of sudo. * [syntastic](https://github.com/scrooloose/syntastic) Uses system compilers and parsers to check syntax either on-the-fly or after saving a compatible document. +* [tabular](https://github.com/godlygeek/tabular) Vim script for text filtering and alignment. * [tagbar](https://github.com/majutsushi/tagbar) Uses ctags to generate a sidebar of the tags for the current file. * [tcommand_vim](https://github.com/tomtom/tcommand_vim) Select commands, menu items etc. from a list * [tlib_vim](https://github.com/tomtom/tlib_vim) Some utility functions for VIM diff --git a/vim/bundle/tabular b/vim/bundle/tabular new file mode 160000 index 0000000..60f2564 --- /dev/null +++ b/vim/bundle/tabular @@ -0,0 +1 @@ +Subproject commit 60f25648814f0695eeb6c1040d97adca93c4e0bb diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index d3613f1..50fd7f8 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -513,7 +513,7 @@ 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" - nnoremap F :Autoformat:echo "The document has been formatted with :Autoformat" + nnoremap F ':Autoformat:echo "The document has been formatted with :Autoformat"' nnoremap w ':FixWhitespace:echo "Trailing whitespace has been removed"' nnoremap t ':retab:noh:echo "Tabs have been converted to spaces"' @@ -658,6 +658,7 @@ "markdown: launch table of contents instead of the tagbar autocmd FileType mkd map ':Toch' autocmd FileType mkd map ':Toch' + autocmd Filetype mkd nnoremap F ':TableFormat:echo "Markdown tables have been formatted with :FormatTable"' "markdown table of contents autocmd FileType qf map 0