Remove the markdown tableformat functionality

This commit is contained in:
Kevin MacMartin 2024-03-03 21:49:58 -05:00
parent 45ee060d01
commit b84a308f44
3 changed files with 0 additions and 25 deletions

View file

@ -181,4 +181,3 @@ For a complete list of mappings specific to **darkcloud-vimconfig**, check the l
## Credits
* By Kevin MacMartin: [GitHub Projects](https://github.com/prurigro?tab=repositories) | [Arch Linux AUR Packages](https://aur.archlinux.org/packages/?SeB=m&K=prurigro)
* The [vim-markdown](https://github.com/plasticboy/vim-markdown) plugin **TableFormat** command, used to format tables in markdown files, was pulled into [plugins.vim](https://github.com/prurigro/darkcloud-vimconfig/blob/master/vim/config/plugins.vim) from [ftplugin/mkd](https://github.com/plasticboy/vim-markdown/blob/master/ftplugin/mkd.vim).

View file

@ -197,10 +197,6 @@
" ?> | (A) -> close the dialog
" ?< | (A) -> close the dialog
"
" (markdown)
" <Leader>f | (N) -> format a table
" <Leader>f | (V) -> format a table
"
" (error/location list)
" <Left> | (A) -> up
" <Right> | (A) -> down
@ -662,10 +658,6 @@
autocmd FileType help map <buffer> <silent><expr> <Leader>? ':q<CR>'
endif
"markdown
autocmd FileType markdown nnoremap <buffer> <silent><expr> <Leader>f ':TableFormat<CR>'
autocmd FileType markdown xnoremap <buffer> <silent><expr> <Leader>f '<Esc>:TableFormat<CR>gv'
"error/location list
autocmd FileType qf map <buffer> <Left> <Up>
autocmd FileType qf map <buffer> <Right> <Down>

View file

@ -1,16 +0,0 @@
"This Tabular TableFormat() function is taken from the
"vim-markdown project by plasticboy, which can be found
"at https://github.com/plasticboy/vim-markdown and is
"licensed with the MIT license.
function! s:TableFormat()
let l:pos = getpos('.')
normal! {
call search('|')
normal! j
s/[^|]//g
Tabularize /|
s/ /-/g
call setpos('.', l:pos)
endfunction
command! -buffer TableFormat call s:TableFormat()