Open shubham-cpp opened 1 year ago
0a1
> let g:loaded_matchit = 1
17a19
> set background=dark
18a21
> let g:lion_squeeze_spaces = 1
38c41,42
< Plug 'tpope/vim-surround'
---
> " Plug 'tpope/vim-surround'
> Plug 'tommcdo/vim-lion'
43a48,49
> Plug 'andymass/vim-matchup'
> Plug 'mg979/vim-visual-multi', {'branch':'master'}
44a51
> " Lua based
46a54,55
> Plug 'ggandor/leap.nvim'
> Plug 'kylechui/nvim-surround'
54c63
< set background=dark
---
>
60,112c69,132
< " VsCode Any
< map zh <Cmd>call VSCodeNotify('yo1dog.cursor-trim.lTrimCursor')<CR>
< map zl <Cmd>call VSCodeNotify('yo1dog.cursor-trim.rTrimCursor')<CR>
< map zi <Cmd>call VSCodeNotify('yo1dog.cursor-trim.trimCursor')<CR>
< map ze <Cmd>call VSCodeNotify('scrollLineDown')<CR>
< map zy <Cmd>call VSCodeNotify('scrollLineUp')<CR>
< map [f <Cmd>call VSCodeNotify('workbench.view.search.focus')<CR>
< map ]f <Cmd>call VSCodeNotify('workbench.action.replaceInFiles')<CR>
< map gD <Cmd>call VSCodeNotify('editor.action.revealDefinitionAside')<CR>
< map gr <Cmd>call VSCodeNotify('editor.action.goToReferences')<CR>
< map [s <Cmd>call VSCodeNotify('editor.action.toggleStickyScroll')<CR>
< map =< <Cmd>call VSCodeNotify('editor.action.trimTrailingWhitespace')<CR>
< map gl <Cmd>call VSCodeNotify('editor.action.openLink')<CR>
< xmap gc <Plug>VSCodeCommentary
< nmap gc <Plug>VSCodeCommentary
< omap gc <Plug>VSCodeCommentary
< nmap gcc <Plug>VSCodeCommentaryLine
< map <C-d> 15jzz
< map <C-u> 15kzz
<
< vnoremap <leader>f <Cmd>call VSCodeNotifyRangePos('editor.action.formatSelection', line("v"), line("."), col("v"), col("."), 1)<CR>
< nmap gb <Cmd>call VSCodeNotify('editor.action.addSelectionToNextFindMatch')<cr>
<
< nnoremap <C-Up> <Cmd>call VSCodeNotify('editor.action.insertCursorAbove')<cr>
< nnoremap <C-Down> <Cmd>call VSCodeNotify('editor.action.insertCursorBelow')<cr>
< nnoremap <C-Right> <Cmd>call VSCodeNotify('workbench.action.nextEditor')<cr>
< nnoremap <C-Left> <Cmd>call VSCodeNotify('workbench.action.previousEditor')<cr>
<
< nnoremap <leader>o <Cmd>call VSCodeNotify('workbench.action.openRecent')<CR>
< nnoremap ,w <Cmd>call VSCodeNotify('workbench.action.files.save')<cr>
< nnoremap ,W <Cmd>call VSCodeNotify('workbench.action.files.saveWithoutFormatting')<cr>
< nnoremap gh <Cmd>call VSCodeNotify('editor.action.showHover')<cr>
<
< " VsCode Folding
< map za <Cmd>call VSCodeNotify('editor.toggleFold')<CR>
< map zC <Cmd>call VSCodeNotify('editor.foldAll')<CR>
< map zO <Cmd>call VSCodeNotify('editor.unfoldAll')<CR>
< map zp <Cmd>call VSCodeNotify('editor.gotoParentFold')<CR>
<
<
< nnoremap <C-b> <Cmd>call VSCodeNotify('workbench.action.toggleSidebarVisibility')<cr>
< nnoremap <C-j> <Cmd>call VSCodeNotify('workbench.action.terminal.toggleTerminal')<cr>
< nnoremap <leader>gg <Cmd>call VSCodeNotify('workbench.view.scm')<cr>
< nnoremap <leader>ge <Cmd>call VSCodeNotify('workbench.view.extensions')<cr>
< nnoremap <leader>gs <Cmd>call VSCodeNotify('workbench.view.search.toggleVisibility')<cr>
< nnoremap <leader>gf <Cmd>call VSCodeNotify('workbench.view.explorer')<cr>
< nnoremap <leader>gk <Cmd>call VSCodeNotify('workbench.action.openGlobalKeybindings')<cr>
< " VsCode Scrolling
< map zl <Cmd>call VSCodeNotify('toggleTypewriter')<CR>
< " nnoremap <C-w><C-c> <Cmd>call VSCodeNotify('workbench.action.closeActiveEditor')<CR>k
< imap <C-k> <Cmd>call VSCodeNotify('editor.action.insertLineBefore')<CR>
< nnoremap <A-h> <Cmd>call VSCodeNotify('workbench.action.previousEditor')<cr>
< nnoremap <A-l> <Cmd>call VSCodeNotify('workbench.action.nextEditor')<cr>
---
> " VsCode Any
> map zh <Cmd>call VSCodeNotify('yo1dog.cursor-trim.lTrimCursor')<CR>
> map zl <Cmd>call VSCodeNotify('yo1dog.cursor-trim.rTrimCursor')<CR>
> map zi <Cmd>call VSCodeNotify('yo1dog.cursor-trim.trimCursor')<CR>
> map ze <Cmd>call VSCodeNotify('scrollLineDown')<CR>
> map zy <Cmd>call VSCodeNotify('scrollLineUp')<CR>
> map [f <Cmd>call VSCodeNotify('workbench.view.search.focus')<CR>
> map ]f <Cmd>call VSCodeNotify('workbench.action.replaceInFiles')<CR>
> map gD <Cmd>call VSCodeNotify('editor.action.revealDefinitionAside')<CR>
> map gr <Cmd>call VSCodeNotify('editor.action.goToReferences')<CR>
> map [s <Cmd>call VSCodeNotify('editor.action.toggleStickyScroll')<CR>
> map =< <Cmd>call VSCodeNotify('editor.action.trimTrailingWhitespace')<CR>
> map gl <Cmd>call VSCodeNotify('editor.action.openLink')<CR>
> xmap gc <Plug>VSCodeCommentary
> nmap gc <Plug>VSCodeCommentary
> omap gc <Plug>VSCodeCommentary
> nmap gcc <Plug>VSCodeCommentaryLine
> map <C-d> 15jzz
> map <C-u> 15kzz
>
> vnoremap <leader>f <Cmd>call VSCodeNotifyRangePos('editor.action.formatSelection', line("v"), line("."), col("v"), col("."), 1)<CR>
> nmap gb <Cmd>call VSCodeNotify('editor.action.addSelectionToNextFindMatch')<cr>
>
> " nnoremap <C-Up> <Cmd>call VSCodeNotify('editor.action.insertCursorAbove')<cr>
> " nnoremap <C-Down> <Cmd>call VSCodeNotify('editor.action.insertCursorBelow')<cr>
> nnoremap <C-Right> <Cmd>call VSCodeNotify('workbench.action.nextEditor')<cr>
> nnoremap <C-Left> <Cmd>call VSCodeNotify('workbench.action.previousEditor')<cr>
>
> nnoremap <leader>o <Cmd>call VSCodeNotify('workbench.action.openRecent')<CR>
> nnoremap ,w <Cmd>call VSCodeNotify('workbench.action.files.save')<cr>
> nnoremap ,W <Cmd>call VSCodeNotify('workbench.action.files.saveWithoutFormatting')<cr>
> nnoremap gh <Cmd>call VSCodeNotify('editor.action.showHover')<cr>
>
> " VsCode Folding
> map za <Cmd>call VSCodeNotify('editor.toggleFold')<CR>
> map zC <Cmd>call VSCodeNotify('editor.foldAll')<CR>
> map zO <Cmd>call VSCodeNotify('editor.unfoldAll')<CR>
> map zp <Cmd>call VSCodeNotify('editor.gotoParentFold')<CR>
>
>
> nnoremap <C-b> <Cmd>call VSCodeNotify('workbench.action.toggleSidebarVisibility')<cr>
> nnoremap <C-j> <Cmd>call VSCodeNotify('workbench.action.terminal.toggleTerminal')<cr>
> nnoremap <leader>gg <Cmd>call VSCodeNotify('workbench.view.scm')<cr>
> nnoremap <leader>ge <Cmd>call VSCodeNotify('workbench.view.extensions')<cr>
> nnoremap <leader>gs <Cmd>call VSCodeNotify('workbench.view.search.toggleVisibility')<cr>
> nnoremap <leader>gf <Cmd>call VSCodeNotify('workbench.view.explorer')<cr>
> nnoremap <leader>gk <Cmd>call VSCodeNotify('workbench.action.openGlobalKeybindings')<cr>
> " VsCode Scrolling
> map zl <Cmd>call VSCodeNotify('toggleTypewriter')<CR>
> " nnoremap <C-w><C-c> <Cmd>call VSCodeNotify('workbench.action.closeActiveEditor')<CR>k
> imap <C-k> <Cmd>call VSCodeNotify('editor.action.insertLineBefore')<CR>
> nnoremap <A-h> <Cmd>call VSCodeNotify('workbench.action.previousEditor')<cr>
> nnoremap <A-l> <Cmd>call VSCodeNotify('workbench.action.nextEditor')<cr>
> nnoremap <A-j> <cmd>call VSCodeNotify('editor.action.moveLinesDownAction')<cr>
> nnoremap <A-k> <cmd>call VSCodeNotify('editor.action.moveLinesUpAction')<cr>
>
> let g:VM_maps = {}
> let g:VM_maps["Select Cursor Down"] = '<C-Down>' " start selecting down
> let g:VM_maps["Select Cursor Up"] = '<C-Up>' " start selecting up
>
>
> inoremap <C-Up> <Cmd>call VSCodeNotify('editor.action.insertCursorAbove')<cr>
> inoremap <C-Down> <Cmd>call VSCodeNotify('editor.action.insertCursorBelow')<cr>
>
114,118c134,159
< noremap <C-f> <C-f>zz
< noremap <C-b> <C-b>zz
< map <C-d> 12jzz
< map <C-u> 12kzz
< nnoremap zp vaBo^<Esc>
---
>
> nnoremap <A-j> mz:m+<cr>`z
> nnoremap <A-k> mz:m-2<cr>`z
> noremap <C-f> <C-f>zz
> noremap <C-b> <C-b>zz
> map <C-d> 12jzz
> map <C-u> 12kzz
> nnoremap zp vaBo^<Esc>
>
>
> let g:VM_maps = {}
> let g:VM_mouse_mappings = 1
> let g:VM_maps['Find Under'] = '<C-n>' " replace C-n
> let g:VM_maps['Find Subword Under'] = '<C-n>' " replace visual C-n
> let g:VM_maps["Select Cursor Down"] = '<C-Down>' " start selecting down
> let g:VM_maps["Select Cursor Up"] = '<C-Up>' " start selecting up
> let g:VM_maps["Undo"] = 'u'
> let g:VM_maps["Redo"] = '<C-r>'
> let g:VM_leader = ','
> let g:VM_maps["Select All"] = '\\A' " '\\' are meant to be g:VM_leader
> let g:VM_maps["Start Regex Search"] = '\\/'
> let g:VM_maps["Visual Regex"] = '\\/'
> let g:VM_maps["Visual All"] = '\\A'
> let g:VM_maps["Visual Add"] = '\\a'
> let g:VM_maps["Visual Find"] = '\\f'
> let g:VM_maps["Visual Cursors"] = '\\c'
124,126c165,167
< nmap s <plug>(SubversiveSubstitute)
< nmap ss <plug>(SubversiveSubstituteLine)
< nmap S <plug>(SubversiveSubstituteToEndOfLine)
---
> nmap x <plug>(SubversiveSubstitute)
> nmap xx <plug>(SubversiveSubstituteLine)
> nmap X <plug>(SubversiveSubstituteToEndOfLine)
147,148d187
< nnoremap <A-j> mz:m+<cr>`z
< nnoremap <A-k> mz:m-2<cr>`z
225c264,276
< EOF
\ No newline at end of file
---
> local ok_leap, leap = pcall(require,'leap')
> if ok_leap then
> leap.add_default_mappings()
> end
>
> local ok_surround, surround = pcall(require,'nvim-surround')
> if ok_surround then
> surround.setup({})
> end
>
> EOF
>
>
Vscode or Neovim, why not both
Vscode settings.json
```jsonc { // "workbench.colorTheme": "One Dark Pro", // "workbench.iconTheme": "material-icon-theme", "tabnine.experimentalAutoImports": true, "files.trimTrailingWhitespace": true, "editor.bracketPairColorization.independentColorPoolPerBracketType": true, "editor.guides.bracketPairs": "active", "editor.quickSuggestions": { "other": true, "comments": true, "strings": true }, "workbench.colorCustomizations": { "editorCursor.foreground": "#e75c34", // "#d470cb", "editorCursor.background": "#fff0cb", "statusBar.background": "#3c3c3c" }, "editor.suggest.localityBonus": true, "editor.suggestSelection": "recentlyUsedByPrefix", "editor.wordBasedSuggestionsMode": "allDocuments", "editor.fontSize": 14, "editor.fontFamily": "'FiraCode NFM','JetBrainsMono NFM','Hack NFM',MonoLisa,'Cascadia Code', Consolas, 'Courier New', monospace", "vim.useSystemClipboard": true, "editor.wordWrap": "on", "editor.fontLigatures": true, "extensions.experimental.affinity": { //makes neovim faster, apparently "asvetliakov.vscode-neovim": 1 }, "vim.foldfix": true, "vim.highlightedyank.enable": true, "vim.changeWordIncludesWhitespace": true, "vim.easymotion": true, "vim.gdefault": true, "vim.leader": "neovim: init.vim
```vim " Basic settings set relativenumber set tabstop=2 set softtabstop=2 set shiftwidth=2 set expandtab set autoindent set smartindent set mouse=a set nocompatible set ignorecase set smartcase set path+=** set clipboard+=unnamedplus set iskeyword+=- set wildmenu syntax enable let g:mapleader = " " " Trigger a highlight in the appropriate direction when pressing these keys: let g:qs_highlight_on_keys = ['f', 'F', 't', 'T'] " let g:qs_lazy_highlight = 1 function! Cond(Cond, ...) let opts = get(a:000, 0, {}) return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] }) endfunction " Plugging plugins call plug#begin() Plug 'kana/vim-textobj-user' Plug 'kana/vim-textobj-entire' Plug 'kana/vim-textobj-line' " Plug 'michaeljsmith/vim-indent-object' " Plug 'christoomey/vim-titlecase' Plug 'tpope/vim-repeat' Plug 'sheerun/vim-polyglot' Plug 'sainnhe/everforest' Plug 'tpope/vim-surround' Plug 'junegunn/vim-easy-align' Plug 'tpope/vim-commentary' Plug 'wellle/targets.vim' Plug 'unblevable/quick-scope' Plug 'svermeulen/vim-subversive' Plug 'Darazaki/indent-o-matic' Plug 'monaqa/dial.nvim' call plug#end() " let g:sandwich#recipes = deepcopy(g:sandwich#default_recipes) " Color theme configuration if has('termguicolors') set termguicolors endif set background=dark let g:everforest_background = 'hard' let g:everforest_better_performance = 1 colorscheme everforest if exists('g:vscode') " VsCode Any map zhChange the init.vim to init.lua