From 7bdd4f7123d815cdad69f9d0ed248da6559b7d08 Mon Sep 17 00:00:00 2001 From: ChristianChiarulli Date: Sat, 16 Feb 2019 17:12:38 -0500 Subject: added test file --- commands/leadercommands.txt | 17 +++++++++++++++++ init.vim | 1 + modules/general.vim | 10 +++++++--- modules/plugins.vim | 6 +++++- modules/terminal.vim | 25 +++++++++++++++++++++++++ modules/test.vim | 19 +++++++++++++++++++ 6 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 commands/leadercommands.txt create mode 100644 modules/terminal.vim create mode 100644 modules/test.vim diff --git a/commands/leadercommands.txt b/commands/leadercommands.txt new file mode 100644 index 00000000..c2d2479c --- /dev/null +++ b/commands/leadercommands.txt @@ -0,0 +1,17 @@ +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing +:g - open thing :g - open thing :g - open thing :g - open thing + + + diff --git a/init.vim b/init.vim index 98abc1a7..8e667b4d 100644 --- a/init.vim +++ b/init.vim @@ -13,6 +13,7 @@ source $HOME/.config/nvim/modules/language_server.vim source $HOME/.config/nvim/modules/ale.vim source $HOME/.config/nvim/modules/goyo-limelight.vim source $HOME/.config/nvim/modules/relativenums.vim +source $HOME/.config/nvim/modules/test.vim "npm i -g bash-language-server diff --git a/modules/general.vim b/modules/general.vim index 786152d2..5b187c79 100644 --- a/modules/general.vim +++ b/modules/general.vim @@ -55,9 +55,10 @@ nnoremap inoremap pumvisible() ? "\" : "\" " Open terminal with F1 nnoremap :10split term://bash +nnoremap :bdelete! term://* " insert mode for terminal -autocmd BufWinEnter,WinEnter term://* startinsert -autocmd BufLeave term://* stopinsert +""autocmd BufWinEnter,WinEnter term://* startinsert +""autocmd BufLeave term://* stopinsert " Toggle tagbar "nnoremap :TagbarToggle " Toggle Line numbers @@ -82,6 +83,7 @@ autocmd BufLeave term://* stopinsert " Switch to rename for LSP to do add leader ""nnoremap :SearchTasks * +nnoremap q :q nnoremap n :NERDTreeToggle nnoremap m :TagbarToggle nnoremap l :set nonumber! @@ -89,7 +91,7 @@ nnoremap o :only nnoremap s :Startify nnoremap w :w nnoremap p :pclose -nnoremap bu :BuffergatorToggle +nnoremap b :BuffergatorToggle nnoremap gy :Goyo nnoremap hi :nohlsearch nnoremap hs :split @@ -126,3 +128,5 @@ tnoremap l nnoremap :bnext " SHIFT-TAB will go back nnoremap :bprevious + + diff --git a/modules/plugins.vim b/modules/plugins.vim index feaa9ed2..4fe4d5ce 100644 --- a/modules/plugins.vim +++ b/modules/plugins.vim @@ -14,9 +14,13 @@ if dein#load_state('~/.config/nvim/dein') " call dein#add('liuchengxu/space-vim-dark') " call dein#add('joshdick/onedark.vim') " call dein#add('morhetz/gruvbox') + call dein#add('jacoborus/tender.vim') + "Interface" + call dein#add('Shougo/denite.nvim') " Neoterm call dein#add('kassio/neoterm') - call dein#add('jacoborus/tender.vim') + " Running tests in vim " + call dein#add('janko-m/vim-test') " Better Syntax Support call dein#add('sheerun/vim-polyglot') " powerline diff --git a/modules/terminal.vim b/modules/terminal.vim new file mode 100644 index 00000000..5dfe28c3 --- /dev/null +++ b/modules/terminal.vim @@ -0,0 +1,25 @@ +" I am experimenting with different ways to use the terminal in nvim " +" So far I hate all my options + +let s:term_buf = 0 +let s:term_win = 0 + +function! Term_toggle(height) + if win_gotoid(s:term_win) + hide + else + botright new + exec "resize " . a:height + try + exec "buffer " . s:term_buf + catch + call termopen($SHELL, {"detach": 0}) + let s:term_buf = bufnr("") + endtry + startinsert! + let s:term_win = win_getid() + endif +endfunction + +nnoremap :call Term_toggle(10) +tnoremap :call Term_toggle(10) diff --git a/modules/test.vim b/modules/test.vim new file mode 100644 index 00000000..bb9cb1ec --- /dev/null +++ b/modules/test.vim @@ -0,0 +1,19 @@ +"Place for me to test things" + +let s:menus = {} +let s:menus.denite = { 'description': 'denite commands' } +let s:menus.denite.command_candidates = [ +\ ['> file_rec', 'Denite file_rec'], +\ ['> file_mru', 'Denite file_mru'], +\ ] + +call denite#custom#var('menu', 'menus', s:menus) + +function Command () + set wrap + set nobuflisted + :pedit ~/.config/nvim/commands/leadercommands.txt + +endfunction + +nmap :call SaveBackup() -- cgit v1.2.3