Merge branch 'merge_table_mode'
This commit is contained in:
commit
42dc76f53a
|
@ -19,7 +19,8 @@ set completeopt=menuone,noinsert,noselect
|
||||||
" Set completeopt to have a better completion experience"
|
" Set completeopt to have a better completion experience"
|
||||||
set completeopt=menuone,noinsert,noselect
|
set completeopt=menuone,noinsert,noselect
|
||||||
|
|
||||||
" load nvim-tree stuff
|
|
||||||
|
" load plugins from extra files
|
||||||
runtime nvim-tree.vim
|
runtime nvim-tree.vim
|
||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
@ -34,6 +35,8 @@ Plug 'EdenEast/nightfox.nvim' " Vim-Plug
|
||||||
Plug 'numToStr/FTerm.nvim' " floating terminal, toggle with <F11>
|
Plug 'numToStr/FTerm.nvim' " floating terminal, toggle with <F11>
|
||||||
Plug 'kdheepak/lazygit.nvim'
|
Plug 'kdheepak/lazygit.nvim'
|
||||||
Plug 'nvim-lualine/lualine.nvim' " nicer status line
|
Plug 'nvim-lualine/lualine.nvim' " nicer status line
|
||||||
|
Plug 'goolord/alpha-nvim'
|
||||||
|
Plug 'dhruvasagar/vim-table-mode'
|
||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
|
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
|
||||||
|
@ -44,6 +47,8 @@ runtime markdownpreview.vim
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
|
" load plugins from extra files
|
||||||
|
runtime nvim-table-mode.vim
|
||||||
|
|
||||||
" no default mappings for vim smoothie (fancy scrolling)
|
" no default mappings for vim smoothie (fancy scrolling)
|
||||||
let g:smoothie_no_default_mappings = 1
|
let g:smoothie_no_default_mappings = 1
|
||||||
|
@ -131,7 +136,6 @@ inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||||
" slime (sends stuff to other programs, like ipython)
|
" slime (sends stuff to other programs, like ipython)
|
||||||
let g:slime_target = "neovim"
|
let g:slime_target = "neovim"
|
||||||
|
|
||||||
|
|
||||||
"------------------------------------------------------
|
"------------------------------------------------------
|
||||||
lua << EOF
|
lua << EOF
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
" Tip: You can use the following to quickly enable / disable table mode in insert mode by using || or __:
|
||||||
|
function! s:isAtStartOfLine(mapping)
|
||||||
|
let text_before_cursor = getline('.')[0 : col('.')-1]
|
||||||
|
let mapping_pattern = '\V' . escape(a:mapping, '\')
|
||||||
|
let comment_pattern = '\V' . escape(substitute(&l:commentstring, '%s.*$', '', ''), '\')
|
||||||
|
return (text_before_cursor =~? '^' . ('\v(' . comment_pattern . '\v)?') . '\s*\v' . mapping_pattern . '\v$')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
inoreabbrev <expr> <bar><bar>
|
||||||
|
\ <SID>isAtStartOfLine('\|\|') ?
|
||||||
|
\ '<c-o>:TableModeEnable<cr><bar><space><bar><left><left>' : '<bar><bar>'
|
||||||
|
inoreabbrev <expr> __
|
||||||
|
\ <SID>isAtStartOfLine('__') ?
|
||||||
|
\ '<c-o>:silent! TableModeDisable<cr>' : '__'
|
Loading…
Reference in New Issue