Browse Source

added test file

ChristianChiarulli 6 years ago
parent
commit
7bdd4f7123
6 changed files with 74 additions and 4 deletions
  1. 17 0
      commands/leadercommands.txt
  2. 1 0
      init.vim
  3. 7 3
      modules/general.vim
  4. 5 1
      modules/plugins.vim
  5. 25 0
      modules/terminal.vim
  6. 19 0
      modules/test.vim

+ 17 - 0
commands/leadercommands.txt

@@ -0,0 +1,17 @@
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+<space>:g - open thing              <space>:g - open thing              <space>:g - open thing              <space>:g - open thing
+
+
+

+ 1 - 0
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

+ 7 - 3
modules/general.vim

@@ -55,9 +55,10 @@ nnoremap <C-c> <Esc>
 inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
 " Open terminal with F1
 nnoremap <silent> <F1> :10split term://bash<CR>
+nnoremap <silent> <F2> :bdelete! term://*<return>
 " 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 <silent> <F2> :TagbarToggle<CR>
 " Toggle Line numbers
@@ -82,6 +83,7 @@ autocmd BufLeave term://* stopinsert
 " Switch to rename for LSP to do add leader
 ""nnoremap <F4> :SearchTasks *<CR>
 
+nnoremap <silent> <leader>q :q<return>
 nnoremap <silent> <leader>n :NERDTreeToggle<return>
 nnoremap <silent> <leader>m :TagbarToggle<return>
 nnoremap <silent> <leader>l :set nonumber!<return>
@@ -89,7 +91,7 @@ nnoremap <silent> <leader>o :only<return>
 nnoremap <silent> <leader>s :Startify<return>
 nnoremap <silent> <leader>w :w<return>
 nnoremap <silent> <leader>p :pclose<return>
-nnoremap <silent> <leader>bu :BuffergatorToggle<return>
+nnoremap <silent> <leader>b :BuffergatorToggle<return>
 nnoremap <silent> <leader>gy :Goyo<return>
 nnoremap <silent> <leader>hi :nohlsearch<return>
 nnoremap <silent> <leader>hs :split<return>
@@ -126,3 +128,5 @@ tnoremap <C-l> <C-\><C-n><C-w>l
 nnoremap <TAB> :bnext<CR>
 " SHIFT-TAB will go back
 nnoremap <S-TAB> :bprevious<CR>
+
+

+ 5 - 1
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

+ 25 - 0
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 <silent> <M-t> :call Term_toggle(10)<cr>
+tnoremap <silent> <M-t> <C-\><C-n>:call Term_toggle(10)<cr>

+ 19 - 0
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 <silent>  <C-B>  :call SaveBackup()<CR>