diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | general/functions.vim | 2 | ||||
| -rw-r--r-- | general/settings.vim | 87 | ||||
| -rw-r--r-- | init.vim | 82 | ||||
| -rw-r--r-- | keys/mappings.vim | 102 | ||||
| -rw-r--r-- | keys/which-key.vim | 2 | ||||
| -rw-r--r-- | utils/tasks.ini | 13 | ||||
| -rw-r--r-- | vim-plug/plugins.vim | 6 | ||||
| -rw-r--r-- | vscode/windows.vim | 67 | 
10 files changed, 150 insertions, 218 deletions
| @@ -4,6 +4,7 @@ tags*  pythonpath.vim  nodepath.vim  autoload/plugged/* +vimspector-config/*  paths.vim  session  wiki/ @@ -162,6 +162,8 @@ TabNine::config  - native lsp  - treesitter -## VSCode integration +## Things to look into -We will be integrating with VSCode using [this](https://github.com/asvetliakov/vscode-neovim) +**Python** +https://realpython.com/python-debugging-pdb/ " breakpoint syntax is really cool +also look into profiling as well diff --git a/general/functions.vim b/general/functions.vim index 47284f2e..0860b920 100644 --- a/general/functions.vim +++ b/general/functions.vim @@ -1,3 +1,5 @@ +" Random Useful Functions +  " Turn spellcheck on for markdown files  augroup auto_spellcheck    autocmd BufNewFile,BufRead *.md setlocal spell diff --git a/general/settings.vim b/general/settings.vim index 3124eb75..b2910931 100644 --- a/general/settings.vim +++ b/general/settings.vim @@ -1,52 +1,49 @@  set iskeyword+=-                      	" treat dash separated words as a word text object"  set formatoptions-=cro                  " Stop newline continution of comments -if !exists('g:vscode') -  syntax enable                           " Enables syntax highlighing -  set hidden                              " Required to keep multiple buffers open multiple buffers -  set nowrap                              " Display long lines as just one line -  set encoding=utf-8                      " The encoding displayed  -  set pumheight=10                        " Makes popup menu smaller -  set fileencoding=utf-8                  " The encoding written to file -  set ruler              			            " Show the cursor position all the time -  set cmdheight=2                         " More space for displaying messages -  set mouse=a                             " Enable your mouse -  set splitbelow                          " Horizontal splits will automatically be below -  set splitright                          " Vertical splits will automatically be to the right -  set t_Co=256                            " Support 256 colors -  set conceallevel=0                      " So that I can see `` in markdown files -  set tabstop=2                           " Insert 2 spaces for a tab -  set shiftwidth=2                        " Change the number of space characters inserted for indentation -  set smarttab                            " Makes tabbing smarter will realize you have 2 vs 4 -  set expandtab                           " Converts tabs to spaces -  set smartindent                         " Makes indenting smart -  set autoindent                          " Good auto indent -  set laststatus=2                        " Always display the status line -  set number                              " Line numbers -  set cursorline                          " Enable highlighting of the current line -  set background=dark                     " tell vim what the background color looks like -  set showtabline=2                       " Always show tabs  -  set noshowmode                          " We don't need to see things like -- INSERT -- anymore -  set nobackup                            " This is recommended by coc -  set nowritebackup                       " This is recommended by coc -  set shortmess+=c                        " Don't pass messages to |ins-completion-menu|. -  set signcolumn=yes                      " Always show the signcolumn, otherwise it would shift the text each time -  set updatetime=300                      " Faster completion -  set timeoutlen=100                      " By default timeoutlen is 1000 ms -  set clipboard=unnamedplus               " Copy paste between vim and everything else -  set incsearch -  set guifont=Fira\ Code\ Nerd\ Font -  " let $NVIM_TUI_ENABLE_TRUE_COLOR=1 -  " set mmp=1300 -  " set autochdir                           " Your working directory will always be the same as your working directory -  " set foldcolumn=2                        " Folding abilities +syntax enable                           " Enables syntax highlighing +set hidden                              " Required to keep multiple buffers open multiple buffers +set nowrap                              " Display long lines as just one line +set encoding=utf-8                      " The encoding displayed +set pumheight=10                        " Makes popup menu smaller +set fileencoding=utf-8                  " The encoding written to file +set ruler              			            " Show the cursor position all the time +set cmdheight=2                         " More space for displaying messages +set mouse=a                             " Enable your mouse +set splitbelow                          " Horizontal splits will automatically be below +set splitright                          " Vertical splits will automatically be to the right +set t_Co=256                            " Support 256 colors +set conceallevel=0                      " So that I can see `` in markdown files +set tabstop=2                           " Insert 2 spaces for a tab +set shiftwidth=2                        " Change the number of space characters inserted for indentation +set smarttab                            " Makes tabbing smarter will realize you have 2 vs 4 +set expandtab                           " Converts tabs to spaces +set smartindent                         " Makes indenting smart +set autoindent                          " Good auto indent +set laststatus=2                        " Always display the status line +set number                              " Line numbers +set cursorline                          " Enable highlighting of the current line +set background=dark                     " tell vim what the background color looks like +set showtabline=2                       " Always show tabs +set noshowmode                          " We don't need to see things like -- INSERT -- anymore +set nobackup                            " This is recommended by coc +set nowritebackup                       " This is recommended by coc +set shortmess+=c                        " Don't pass messages to |ins-completion-menu|. +set signcolumn=yes                      " Always show the signcolumn, otherwise it would shift the text each time +set updatetime=300                      " Faster completion +set timeoutlen=100                      " By default timeoutlen is 1000 ms +set clipboard=unnamedplus               " Copy paste between vim and everything else +set incsearch +set guifont=Fira\ Code\ Nerd\ Font +" let $NVIM_TUI_ENABLE_TRUE_COLOR=1 +" set mmp=1300 +" set autochdir                           " Your working directory will always be the same as your working directory +" set foldcolumn=2                        " Folding abilities -  " au! BufWritePost $MYVIMRC source %      " auto source when writing to init.vm alternatively you can run :source $MYVIMRC -  autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o +" au! BufWritePost $MYVIMRC source %      " auto source when writing to init.vm alternatively you can run :source $MYVIMRC +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o - -  " You can't stop me -  cmap w!! w !sudo tee % -endif +" You can't stop me +cmap w!! w !sudo tee % @@ -5,62 +5,52 @@  "/___/_/ /_/_/\__(_)___/_/_/ /_/ /_/ -" Always source these +" General Settings  source $HOME/.config/nvim/vim-plug/plugins.vim  source $HOME/.config/nvim/general/settings.vim  source $HOME/.config/nvim/general/functions.vim  source $HOME/.config/nvim/keys/mappings.vim  source $HOME/.config/nvim/keys/which-key.vim -" Source depending on if VSCode is our client -if exists('g:vscode') -    " VSCode extension -  source $HOME/.config/nvim/vscode/windows.vim -  source $HOME/.config/nvim/plug-config/easymotion.vim -else -  " ordinary neovim -  source $HOME/.config/nvim/themes/syntax.vim -  source $HOME/.config/nvim/themes/onedark.vim -  source $HOME/.config/nvim/themes/airline.vim -  source $HOME/.config/nvim/plug-config/rnvimr.vim -  source $HOME/.config/nvim/plug-config/fzf.vim -  source $HOME/.config/nvim/plug-config/vim-commentary.vim -  source $HOME/.config/nvim/plug-config/rainbow.vim -  source $HOME/.config/nvim/plug-config/codi.vim -  source $HOME/.config/nvim/plug-config/quickscope.vim -  source $HOME/.config/nvim/plug-config/vim-wiki.vim -  source $HOME/.config/nvim/plug-config/sneak.vim -  source $HOME/.config/nvim/plug-config/coc.vim -  source $HOME/.config/nvim/plug-config/goyo.vim -  source $HOME/.config/nvim/plug-config/vim-rooter.vim -  source $HOME/.config/nvim/plug-config/start-screen.vim -  source $HOME/.config/nvim/plug-config/gitgutter.vim -  source $HOME/.config/nvim/plug-config/closetags.vim -  source $HOME/.config/nvim/plug-config/floaterm.vim -  source $HOME/.config/nvim/plug-config/vista.vim -  source $HOME/.config/nvim/plug-config/xtabline.vim -  source $HOME/.config/nvim/plug-config/polyglot.vim -  source $HOME/.config/nvim/plug-config/far.vim -  source $HOME/.config/nvim/plug-config/tagalong.vim -  source $HOME/.config/nvim/plug-config/illuminate.vim -  source $HOME/.config/nvim/plug-config/bracey.vim -  source $HOME/.config/nvim/plug-config/asynctask.vim -  source $HOME/.config/nvim/plug-config/window-swap.vim -  source $HOME/.config/nvim/plug-config/markdown-preview.vim -  luafile $HOME/.config/nvim/lua/plug-colorizer.lua -endif - +" Themes +source $HOME/.config/nvim/themes/syntax.vim +source $HOME/.config/nvim/themes/onedark.vim +source $HOME/.config/nvim/themes/airline.vim + +" Plugin Configuration +source $HOME/.config/nvim/plug-config/rnvimr.vim +source $HOME/.config/nvim/plug-config/fzf.vim +source $HOME/.config/nvim/plug-config/vim-commentary.vim +source $HOME/.config/nvim/plug-config/rainbow.vim +source $HOME/.config/nvim/plug-config/codi.vim +source $HOME/.config/nvim/plug-config/quickscope.vim +source $HOME/.config/nvim/plug-config/vim-wiki.vim +source $HOME/.config/nvim/plug-config/sneak.vim +source $HOME/.config/nvim/plug-config/coc.vim +source $HOME/.config/nvim/plug-config/goyo.vim +source $HOME/.config/nvim/plug-config/vim-rooter.vim +source $HOME/.config/nvim/plug-config/start-screen.vim +source $HOME/.config/nvim/plug-config/gitgutter.vim +source $HOME/.config/nvim/plug-config/closetags.vim +source $HOME/.config/nvim/plug-config/floaterm.vim +source $HOME/.config/nvim/plug-config/vista.vim +source $HOME/.config/nvim/plug-config/xtabline.vim +source $HOME/.config/nvim/plug-config/polyglot.vim +source $HOME/.config/nvim/plug-config/far.vim +source $HOME/.config/nvim/plug-config/tagalong.vim +source $HOME/.config/nvim/plug-config/illuminate.vim +source $HOME/.config/nvim/plug-config/bracey.vim +source $HOME/.config/nvim/plug-config/asynctask.vim +source $HOME/.config/nvim/plug-config/window-swap.vim +source $HOME/.config/nvim/plug-config/markdown-preview.vim +luafile $HOME/.config/nvim/lua/plug-colorizer.lua + +" Add paths to node and python here  if !empty(glob("~/.config/nvim/paths.vim"))    source $HOME/.config/nvim/paths.vim  endif  " Experimental - -" Python -" https://realpython.com/python-debugging-pdb/ " breakpoint syntax is really cool -" also look into profiling as well - -" let g:vimspector_base_dir=expand( '$HOME/.config/nvim/vimspector-config' ) +let g:vimspector_base_dir=expand( '$HOME/.config/nvim/vimspector-config' )  " let g:vimspector_enable_mappings='HUMAN' -" let g:spaceline_colorscheme = 'one' diff --git a/keys/mappings.vim b/keys/mappings.vim index 94db7ddb..0ae118d0 100644 --- a/keys/mappings.vim +++ b/keys/mappings.vim @@ -1,3 +1,4 @@ +" Basic Key Mappings  imap <C-h> <C-w>h  imap <C-j> <C-w>j @@ -12,67 +13,58 @@ nnoremap <Space> <Nop>  vnoremap < <gv  vnoremap > >gv -if exists('g:vscode') +" Better nav for omnicomplete +inoremap <expr> <c-j> ("\<C-n>") +inoremap <expr> <c-k> ("\<C-p>") -" Simulate same TAB behavior in VSCode -nmap <Tab> :Tabnext<CR> -nmap <S-Tab> :Tabprev<CR> +" I hate escape more than anything else +inoremap jk <Esc> +inoremap kj <Esc> -else -  " Better nav for omnicomplete -  inoremap <expr> <c-j> ("\<C-n>") -  inoremap <expr> <c-k> ("\<C-p>") +" Easy CAPS +" inoremap <c-u> <ESC>viwUi +" nnoremap <c-u> viwU<Esc> -  " I hate escape more than anything else -  inoremap jk <Esc> -  inoremap kj <Esc> +" TAB in general mode will move to text buffer +nnoremap <silent> <TAB> :bnext<CR> +" SHIFT-TAB will go back +nnoremap <silent> <S-TAB> :bprevious<CR> -  " Easy CAPS -  " inoremap <c-u> <ESC>viwUi -  " nnoremap <c-u> viwU<Esc> +" Move selected line / block of text in visual mode +" shift + k to move up +" shift + j to move down +xnoremap K :move '<-2<CR>gv-gv +xnoremap J :move '>+1<CR>gv-gv -  " TAB in general mode will move to text buffer -  nnoremap <silent> <TAB> :bnext<CR> -  " SHIFT-TAB will go back -  nnoremap <silent> <S-TAB> :bprevious<CR> +" Alternate way to save +nnoremap <silent> <C-s> :w<CR> +" Alternate way to quit +nnoremap <silent> <C-Q> :wq!<CR> +" Use control-c instead of escape +nnoremap <silent> <C-c> <Esc> +" <TAB>: completion. +inoremap <silent> <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" -  " Move selected line / block of text in visual mode -  " shift + k to move up -  " shift + j to move down -  xnoremap K :move '<-2<CR>gv-gv -  xnoremap J :move '>+1<CR>gv-gv +" Better window navigation +nnoremap <C-h> <C-w>h +nnoremap <C-j> <C-w>j +nnoremap <C-k> <C-w>k +nnoremap <C-l> <C-w>l -  " Alternate way to save -  nnoremap <silent> <C-s> :w<CR> -  " Alternate way to quit -  nnoremap <silent> <C-Q> :wq!<CR> -  " Use control-c instead of escape -  nnoremap <silent> <C-c> <Esc> -  " <TAB>: completion. -  inoremap <silent> <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" +" Terminal window navigation +tnoremap <C-h> <C-\><C-N><C-w>h +tnoremap <C-j> <C-\><C-N><C-w>j +tnoremap <C-k> <C-\><C-N><C-w>k +tnoremap <C-l> <C-\><C-N><C-w>l +inoremap <C-h> <C-\><C-N><C-w>h +inoremap <C-j> <C-\><C-N><C-w>j +inoremap <C-k> <C-\><C-N><C-w>k +inoremap <C-l> <C-\><C-N><C-w>l +tnoremap <Esc> <C-\><C-n> - -  " Better window navigation -  nnoremap <C-h> <C-w>h -  nnoremap <C-j> <C-w>j -  nnoremap <C-k> <C-w>k -  nnoremap <C-l> <C-w>l - -  " Terminal window navigation -  tnoremap <C-h> <C-\><C-N><C-w>h -  tnoremap <C-j> <C-\><C-N><C-w>j -  tnoremap <C-k> <C-\><C-N><C-w>k -  tnoremap <C-l> <C-\><C-N><C-w>l -  inoremap <C-h> <C-\><C-N><C-w>h -  inoremap <C-j> <C-\><C-N><C-w>j -  inoremap <C-k> <C-\><C-N><C-w>k -  inoremap <C-l> <C-\><C-N><C-w>l -  tnoremap <Esc> <C-\><C-n> - -  " Use alt + hjkl to resize windows -  nnoremap <silent> <M-j>    :resize -2<CR> -  nnoremap <silent> <M-k>    :resize +2<CR> -  nnoremap <silent> <M-h>    :vertical resize -2<CR> -  nnoremap <silent> <M-l>    :vertical resize +2<CR> -endif +" Use alt + hjkl to resize windows +nnoremap <silent> <M-j>    :resize -2<CR> +nnoremap <silent> <M-k>    :resize +2<CR> +nnoremap <silent> <M-h>    :vertical resize -2<CR> +nnoremap <silent> <M-l>    :vertical resize +2<CR> diff --git a/keys/which-key.vim b/keys/which-key.vim index 52ee1f0d..110594d0 100644 --- a/keys/which-key.vim +++ b/keys/which-key.vim @@ -1,3 +1,5 @@ +" Leader Key Maps +  " Map leader to which_key  nnoremap <silent> <leader> :silent <c-u> :silent WhichKey '<Space>'<CR>  vnoremap <silent> <leader> :silent <c-u> :silent WhichKeyVisual '<Space>'<CR> diff --git a/utils/tasks.ini b/utils/tasks.ini index 31daa6d2..5a9e83b8 100644 --- a/utils/tasks.ini +++ b/utils/tasks.ini @@ -1,6 +1,6 @@  [file-compile] -command:javac="$(VIM_FILEPATH)" +command:java=javac "$(VIM_FILEPATH)"  output=terminal  cwd=$(VIM_FILEDIR) @@ -32,4 +32,13 @@ cwd=$(VIM_FILEDIR)  save=2  [project-run] -command:javascript,css,jsx="npm start" +command:javascript,css,jsx=npm start +output=terminal +cwd=$(VIM_FILEDIR) +save=2 + +[gatsby-run] +command=gatsby develop +output=terminal +cwd=$(VIM_FILEDIR) +save=2 diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim index db0458e3..9146fc58 100644 --- a/vim-plug/plugins.vim +++ b/vim-plug/plugins.vim @@ -97,7 +97,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')      Plug 'HerringtonDarkholme/yats.vim'      " Smooth scroll      Plug 'psliwka/vim-smoothie' -    " asynt tasks +    " async tasks      Plug 'skywind3000/asynctasks.vim'      Plug 'skywind3000/asyncrun.vim'      " Swap windows @@ -106,6 +106,10 @@ call plug#begin('~/.config/nvim/autoload/plugged')      Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & npm install'  }      " Better Whitespace      Plug 'ntpeters/vim-better-whitespace' +    " Multiple Cursors +    Plug 'terryma/vim-multiple-cursors' +    " Async Linting Engine +    Plug 'dense-analysis/ale'      " Plugin Graveyard      " Plug 'kaicataldo/material.vim'      " Plug 'NLKNguyen/papercolor-theme' diff --git a/vscode/windows.vim b/vscode/windows.vim deleted file mode 100644 index 436bf981..00000000 --- a/vscode/windows.vim +++ /dev/null @@ -1,67 +0,0 @@ - -"VSCode -function! s:split(...) abort -    let direction = a:1 -    let file = a:2 -    call VSCodeCall(direction == 'h' ? 'workbench.action.splitEditorDown' : 'workbench.action.splitEditorRight') -    if file != '' -        call VSCodeExtensionNotify('open-file', expand(file), 'all') -    endif -endfunction - -function! s:splitNew(...) -    let file = a:2 -    call s:split(a:1, file == '' ? '__vscode_new__' : file) -endfunction - -function! s:closeOtherEditors() -    call VSCodeNotify('workbench.action.closeEditorsInOtherGroups') -    call VSCodeNotify('workbench.action.closeOtherEditors') -endfunction - -function! s:manageEditorSize(...) -    let count = a:1 -    let to = a:2 -    for i in range(1, count ? count : 1) -        call VSCodeNotify(to == 'increase' ? 'workbench.action.increaseViewSize' : 'workbench.action.decreaseViewSize') -    endfor -endfunction - -command! -complete=file -nargs=? Split call <SID>split('h', <q-args>) -command! -complete=file -nargs=? Vsplit call <SID>split('v', <q-args>) -command! -complete=file -nargs=? New call <SID>split('h', '__vscode_new__') -command! -complete=file -nargs=? Vnew call <SID>split('v', '__vscode_new__') -command! -bang Only if <q-bang> == '!' | call <SID>closeOtherEditors() | else | call VSCodeNotify('workbench.action.joinAllGroups') | endif - -nnoremap <silent> <C-w>s :call <SID>split('h')<CR> -xnoremap <silent> <C-w>s :call <SID>split('h')<CR> - -nnoremap <silent> <C-w>v :call <SID>split('v')<CR> -xnoremap <silent> <C-w>v :call <SID>split('v')<CR> - -nnoremap <silent> <C-w>n :call <SID>splitNew('h', '__vscode_new__')<CR> -xnoremap <silent> <C-w>n :call <SID>splitNew('h', '__vscode_new__')<CR> - -nnoremap <silent> <C-j> :call VSCodeNotify('workbench.action.focusBelowGroup')<CR> -xnoremap <silent> <C-j> :call VSCodeNotify('workbench.action.focusBelowGroup')<CR> -nnoremap <silent> <C-k> :call VSCodeNotify('workbench.action.focusAboveGroup')<CR> -xnoremap <silent> <C-k> :call VSCodeNotify('workbench.action.focusAboveGroup')<CR> -nnoremap <silent> <C-h> :call VSCodeNotify('workbench.action.focusLeftGroup')<CR> -xnoremap <silent> <C-h> :call VSCodeNotify('workbench.action.focusLeftGroup')<CR> -nnoremap <silent> <C-l> :call VSCodeNotify('workbench.action.focusRightGroup')<CR> -xnoremap <silent> <C-l> :call VSCodeNotify('workbench.action.focusRightGroup')<CR> - -nnoremap <silent> <C-w>= :<C-u>call VSCodeNotify('workbench.action.evenEditorWidths')<CR> -xnoremap <silent> <C-w>= :<C-u>call VSCodeNotify('workbench.action.evenEditorWidths')<CR> - -nnoremap <silent> <C-w>> :<C-u>call <SID>manageEditorSize(v:count, 'increase')<CR> -xnoremap <silent> <C-w>> :<C-u>call <SID>manageEditorSize(v:count, 'increase')<CR> -nnoremap <silent> <C-w>+ :<C-u>call <SID>manageEditorSize(v:count, 'increase')<CR> -xnoremap <silent> <C-w>+ :<C-u>call <SID>manageEditorSize(v:count, 'increase')<CR> -nnoremap <silent> <C-w>< :<C-u>call <SID>manageEditorSize(v:count, 'decrease')<CR> -xnoremap <silent> <C-w>< :<C-u>call <SID>manageEditorSize(v:count, 'decrease')<CR> -nnoremap <silent> <C-w>- :<C-u>call <SID>manageEditorSize(v:count, 'decrease')<CR> -xnoremap <silent> <C-w>- :<C-u>call <SID>manageEditorSize(v:count, 'decrease')<CR> - -nnoremap <silent> <C-w>_ :<C-u>call VSCodeNotify('workbench.action.toggleEditorWidths')<CR> - | 
