clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

convert vimscript rest to lua with ChatGPT

sspaeti 46e5d03c 927d2de4

+196 -148
+37 -38
nvim/lazy-lock.json
··· 1 1 { 2 2 "ChatGPT.nvim": { "branch": "main", "commit": "ef0cf1f28a22bbf2e9be531f4856d2cace57e4b2" }, 3 - "LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" }, 4 - "aerial.nvim": { "branch": "master", "commit": "79644dbedc189d79573b2a60e247989bbd8f16e7" }, 5 - "alpha-nvim": { "branch": "main", "commit": "9e33db324b8bb7a147bce9ea5496686ee859461d" }, 6 - "black": { "branch": "main", "commit": "839ef35dc1d72bb6eceac9fa809f095e2edcd12b" }, 3 + "LuaSnip": { "branch": "master", "commit": "1f72e43a446961a1372c54038882c1d36e105cab" }, 4 + "aerial.nvim": { "branch": "master", "commit": "fb1f08c9f90e8b0c04b2f2c5d95d06288a14c5b2" }, 5 + "alpha-nvim": { "branch": "main", "commit": "e4fc5e29b731bdf55d204c5c6a11dc3be70f3b65" }, 6 + "black": { "branch": "main", "commit": "068f6fb8fa2b52f647aec8696033e43f6b0db70b" }, 7 7 "blamer.nvim": { "branch": "master", "commit": "f4eb22a9013642c411725fdda945ae45f8d93181" }, 8 - "bufferline.nvim": { "branch": "main", "commit": "2f391fde91b9c3876eee359ee24cc352050e5e48" }, 9 - "catppuccin": { "branch": "main", "commit": "12894370fa3c9e2200f3724c4184354d6b79733a" }, 8 + "bufferline.nvim": { "branch": "main", "commit": "d24378edc14a675c820a303b4512af3bbc5761e9" }, 9 + "catppuccin": { "branch": "main", "commit": "bfe91dfb3a19ffd4445e43611fcde68acbb3fed4" }, 10 10 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 11 11 "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, 12 12 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, 13 13 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 14 14 "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, 15 - "copilot.vim": { "branch": "release", "commit": "98c293994f1bbebd5bade5d5840ead3b2feb5074" }, 15 + "copilot.vim": { "branch": "release", "commit": "a4a6d6b3f9e284e7f5c849619e06cd228cad8abd" }, 16 16 "dbtpal": { "branch": "main", "commit": "6a9d5c355c85ee7f294630402d3eec12798c8972" }, 17 - "diffview.nvim": { "branch": "main", "commit": "766a4f210e67e522659302dc6bd8a8d3b8c08c54" }, 17 + "diffview.nvim": { "branch": "main", "commit": "b0cc22f5708f6b2b4f873b44fbc5eb93020f4e0c" }, 18 18 "firenvim": { "branch": "master", "commit": "3c4babfa0a561d1dc3640a902e67ca0b8af70927" }, 19 - "friendly-snippets": { "branch": "main", "commit": "1723ae01d83f3b3ac1530f1ae22b7b9d5da7749b" }, 20 - "fzf": { "branch": "master", "commit": "01302d097c39c3429de65424c6adb75fcac82187" }, 21 - "fzf.vim": { "branch": "master", "commit": "1dcdb21db618055134cd611f4f5918f6d00a5df0" }, 19 + "friendly-snippets": { "branch": "main", "commit": "ea84a710262cb2c286d439070bad37d36fd3db25" }, 20 + "fzf": { "branch": "master", "commit": "3c09c77269d848f5e7dd8f350a90e8d7ed760845" }, 21 + "fzf.vim": { "branch": "master", "commit": "e0d131d95364edf940a70127fcb5748b86e6955e" }, 22 22 "gh.nvim": { "branch": "main", "commit": "2b5551656c1b896bf4ae06546eaaab00311f9a18" }, 23 23 "github-nvim-theme": { "branch": "main", "commit": "ea713c37691b2519f56cd801a2330bdf66393d0f" }, 24 24 "gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" }, 25 25 "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, 26 26 "highlight-undo.nvim": { "branch": "main", "commit": "1aeada51fb956f1ef121f29ddbb2ef6108a3c480" }, 27 - "indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" }, 27 + "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, 28 28 "kanagawa.nvim": { "branch": "master", "commit": "1749cea392acb7d1548a946fcee1e6f1304cd3cb" }, 29 - "lazy.nvim": { "branch": "main", "commit": "4c8b625bc873ca76b76eee0c28c98f1f7148f17f" }, 30 - "lazygit.nvim": { "branch": "main", "commit": "3466e48439601445e26c65635421625886f2d0c0" }, 29 + "lazy.nvim": { "branch": "main", "commit": "25beed5e2e935ebc00d7e3eed1dc502df3c40e39" }, 30 + "lazygit.nvim": { "branch": "main", "commit": "146c6294bf0b4db1572fa7232039aaa9003a52b9" }, 31 31 "litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" }, 32 - "lsp-zero.nvim": { "branch": "main", "commit": "de0e7d7c75cb032107d4a728aa0a63a61d8e5909" }, 32 + "lsp-zero.nvim": { "branch": "main", "commit": "7e1675e9e90ee08b859d75aa65609e480e55f752" }, 33 33 "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, 34 34 "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, 35 - "mason-lspconfig.nvim": { "branch": "main", "commit": "4f1c72767bec31397d59554f84096909b2887195" }, 36 - "mason-null-ls.nvim": { "branch": "main", "commit": "73c68abdf65279e41526eb152876511a8ae84ea2" }, 37 - "mason.nvim": { "branch": "main", "commit": "b68d3be4b664671002221d43c82e74a0f1006b26" }, 38 - "neo-tree.nvim": { "branch": "v2.x", "commit": "f765e75e7d2444629b5ace3cd7609c12251de254" }, 39 - "neoformat": { "branch": "master", "commit": "1dd282cd64f03418ef9cc345a12ca82b8dcf6e73" }, 40 - "nordic.nvim": { "branch": "main", "commit": "9deae2fd335b426f50d437b5259812b8090372a3" }, 35 + "mason-lspconfig.nvim": { "branch": "main", "commit": "828a538ac8419f586c010996aefa5df6eb7c250b" }, 36 + "mason-null-ls.nvim": { "branch": "main", "commit": "ae0c5fa57468ac65617f1bf821ba0c3a1e251f0c" }, 37 + "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" }, 38 + "neo-tree.nvim": { "branch": "v2.x", "commit": "981a43adcca25e7ccc3c589902d49f25e4d48ebc" }, 39 + "neoformat": { "branch": "master", "commit": "b35ae45f9425c817126be4cc946a950c1cffe6fa" }, 40 + "nordic.nvim": { "branch": "main", "commit": "77611792ab4fa9893cf65960cf8678bfd9c761a2" }, 41 41 "nui.nvim": { "branch": "main", "commit": "d146966a423e60699b084eeb28489fe3b6427599" }, 42 - "null-ls.nvim": { "branch": "main", "commit": "aac27a1fa550de3d0b2c651168167cc0d5366a9a" }, 43 - "nvim-cmp": { "branch": "main", "commit": "2743dd989e9b932e1b4813a4927d7b84272a14e2" }, 44 - "nvim-highlight-colors": { "branch": "main", "commit": "8d7e7fe540b404ec06a248d6e5797eaf3362420c" }, 45 - "nvim-lspconfig": { "branch": "master", "commit": "0011c435282f043a018e23393cae06ed926c3f4a" }, 46 - "nvim-treesitter": { "branch": "master", "commit": "0522bbe90d6f9bb7080621fe70f8ab565e072b98" }, 47 - "nvim-treesitter-context": { "branch": "master", "commit": "63f3ffc50b0afc59be1015153d00922498085be8" }, 42 + "null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" }, 43 + "nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" }, 44 + "nvim-highlight-colors": { "branch": "main", "commit": "e1c976a31d19c10e77b89e054310b1061acb5158" }, 45 + "nvim-lspconfig": { "branch": "master", "commit": "ba3ec2527aa7aae9b989d69966174a22b7d1b1dd" }, 46 + "nvim-treesitter": { "branch": "master", "commit": "19b29f7cb046317b74e60fc7bff2f86ece4dc118" }, 47 + "nvim-treesitter-context": { "branch": "master", "commit": "6f8f788738b968f24a108ee599c5be0031f94f06" }, 48 48 "nvim-treesitter-textobjects": { "branch": "master", "commit": "52f1f3280d9092bfaee5c45be5962fabee3d9654" }, 49 - "nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" }, 50 - "obsidian.nvim": { "branch": "main", "commit": "4d2e1d0efcd857907ac1553517f88f860adbfb8f" }, 51 - "oil.nvim": { "branch": "master", "commit": "a5ff72a8da0df1042ee4c7705c301901062fa6d5" }, 52 - "onedark.nvim": { "branch": "master", "commit": "462b45758ea94ff30ad48979268094590a6b7b7e" }, 53 - "plenary.nvim": { "branch": "master", "commit": "102c02903c74b93c705406bf362049383abc87c8" }, 54 - "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, 49 + "nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" }, 50 + "obsidian.nvim": { "branch": "main", "commit": "1982447bd8481bf5b8e6e033519d54feb77a4e41" }, 51 + "onedark.nvim": { "branch": "master", "commit": "cae5fdf035ee92c407a29ee2ccfcff503d2be7f1" }, 52 + "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, 53 + "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, 55 54 "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, 56 55 "tabular": { "branch": "master", "commit": "339091ac4dd1f17e225fe7d57b48aff55f99b23a" }, 57 56 "telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, 58 - "trouble.nvim": { "branch": "main", "commit": "d99e2abd10808ef91738ce98a5c767e6a51df449" }, 59 - "undotree": { "branch": "master", "commit": "485f01efde4e22cb1ce547b9e8c9238f36566f21" }, 57 + "trouble.nvim": { "branch": "main", "commit": "20d1b30d6925213abece21d35858a16e11d1e9fc" }, 58 + "undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" }, 60 59 "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, 61 - "vim-floaterm": { "branch": "master", "commit": "bd0aee3c861d613f56b85bd9eaffdcab459071fd" }, 62 - "vim-fugitive": { "branch": "master", "commit": "43f18ab9155c853a84ded560c6104e6300ad41da" }, 60 + "vim-floaterm": { "branch": "master", "commit": "bcaeabf89a92a924031d471395054d84bd88ce2f" }, 61 + "vim-fugitive": { "branch": "master", "commit": "b3b838d690f315a503ec4af8c634bdff3b200aaf" }, 63 62 "vim-jinja2-syntax": { "branch": "master", "commit": "2c17843b074b06a835f88587e1023ceff7e2c7d1" }, 64 63 "vim-lastplace": { "branch": "master", "commit": "cef9d62165cd26c3c2b881528a5290a84347059e" }, 65 64 "vim-markdown": { "branch": "master", "commit": "cc82d88e2a791f54d2b6e2b26e41f743351ac947" }, ··· 70 69 "vim-textobj-python": { "branch": "master", "commit": "06de233e805b6bcfd0fde7591c64cf927637feb7" }, 71 70 "vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" }, 72 71 "vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" }, 73 - "which-key.nvim": { "branch": "main", "commit": "d871f2b664afd5aed3dc1d1573bef2fb24ce0484" }, 72 + "which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" }, 74 73 "wpm.nvim": { "branch": "main", "commit": "968c213143311cd07acb299ebe5445f68ae57a67" }, 75 74 "zen-mode.nvim": { "branch": "main", "commit": "68f554702de63f4b7b6b6d4bcb10178f41a0acc7" } 76 75 }
+73 -102
nvim/lua/old_config.vim
··· 1 1 2 - " " Autocomplete with ctrl space 3 - " if has("gui_running") 4 - " " C-Space seems to work under gVim on both Linux and win32 5 - " inoremap <C-Space> <C-n> 6 - " else " no gui 7 - " if has("unix") 8 - " inoremap <Nul> <C-n> 9 - " else 10 - " " I have no idea of the name of Ctrl-Space elsewhere 11 - " endif 12 - " endif 13 2 3 + "" fzf: ctrl f for find files 4 + "nnoremap <C-p> :Files<CR> 5 + "" nnoremap <C-f> :Rg<CR> "-> now on sf 6 + "nnoremap <leader>fw 7 + " \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', expand('<cword>')]}))<cr> 8 + "nnoremap <silent> <Leader>fr :Rg<CR> 9 + "nnoremap <silent> <Leader>fb :Buffers<CR> 10 + "nnoremap <silent> <Leader>f/ :BLines<CR> 11 + "nnoremap <silent> <Leader>fm :Marks<CR> 12 + "nnoremap <silent> <Leader>fc :Commits<CR> 13 + "nnoremap <silent> <Leader>fH :Helptags<CR> 14 + "" find in a specific repo 15 + "command! -bang -nargs=* Rg2 16 + " \ call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".<q-args>, 1, {'dir': system('git -C '.expand('%:p:h').' rev-parse --show-toplevel 2> /dev/null')[:-2]}, <bang>0) 17 + "nnoremap <silent> <Leader>fd :Rg2 search folder 14 18 15 19 20 + "" move window with christoomey/vim-tmux-navigator to align tmux and nvim 21 + "let g:tmux_navigator_no_mappings = 1 22 + "" If the tmux window is zoomed, keep it zoomed when moving from Vim to another pane 23 + "let g:tmux_navigator_preserve_zoom = 1 16 24 17 - " fzf: ctrl f for find files 18 - nnoremap <C-p> :Files<CR> 19 - " nnoremap <C-f> :Rg<CR> "-> now on sf 20 - nnoremap <leader>fw 21 - \ :call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', expand('<cword>')]}))<cr> 22 - nnoremap <silent> <Leader>fr :Rg<CR> 23 - nnoremap <silent> <Leader>fb :Buffers<CR> 24 - nnoremap <silent> <Leader>f/ :BLines<CR> 25 - nnoremap <silent> <Leader>fm :Marks<CR> 26 - nnoremap <silent> <Leader>fc :Commits<CR> 27 - nnoremap <silent> <Leader>fH :Helptags<CR> 28 - " find in a specific repo 29 - command! -bang -nargs=* Rg2 30 - \ call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".<q-args>, 1, {'dir': system('git -C '.expand('%:p:h').' rev-parse --show-toplevel 2> /dev/null')[:-2]}, <bang>0) 31 - nnoremap <silent> <Leader>fd :Rg2 search folder 32 - " :Rg2 apple ./folder_test 33 - " :Rg2 "apple teste" ./folder_test 34 - " :Rg2 --type=js "apple" 35 - " :Rg2 --fixed-strings "apple" 36 - " :Rg2 -e -foo 37 - " :Rg2 apple 38 - " :Rg2 '^port' # Search for lines beginning with 'port' 39 - " :Rg2 '^\s*port' # Search for lines beginning with 'port', possibly after initial whitespace 40 - " :Rg2 Apple --case-sensitive 41 - " :Rg2 Apple --sortr=created # (none, created, path, modified, accessed) descending order 42 - " :Rg2 Apple --sort=created # (none, created, path, modified, accessed) ascending order 43 - " :Rg2 --passthru 'blue' -r 'red' test.txt > tmp.txt && mv tmp.txt test.txt #Replace example 44 - " :Rg2 'port|http' # Search for string 'port' OR string 'http': 45 - " :Rg2 --passthru 'blue' -r 'red' test.txt | sponge test.txt # Replace example If you have moreutils installed 46 - " this will quick search content of files 25 + "noremap <silent> <c-h> :<C-U>TmuxNavigateLeft<cr> 26 + "noremap <silent> <c-j> :<C-U>TmuxNavigateDown<cr> 27 + "noremap <silent> <c-k> :<C-U>TmuxNavigateUp<cr> 28 + "noremap <silent> <c-l> :<C-U>TmuxNavigateRight<cr> 29 + "noremap <silent> <c-t> :<C-U>TmuxNavigatePrevious<cr> 47 30 31 + "" Resize window ABSOLUTE (doing it the same direction wheter in right or left 32 + "" split) 33 + "nnoremap <C-w>l :if winnr() == winnr('$') \| vertical resize -5 \| else \| vertical resize +5 \| endif<CR> 34 + "nnoremap <C-w>h :if winnr() == 1 \| vertical resize -5 \| else \| vertical resize +5 \| endif<CR> 48 35 49 - " move window with christoomey/vim-tmux-navigator to align tmux and nvim 50 - let g:tmux_navigator_no_mappings = 1 51 - " If the tmux window is zoomed, keep it zoomed when moving from Vim to another pane 52 - let g:tmux_navigator_preserve_zoom = 1 36 + "" resize window RELATIVE (Haven't found a absoulte way) 37 + "" nnoremap <C-w>k :wincmd k \| if winnr() == winnr('$') \| resize -5 \| else \| resize +5 \| endif<CR> 38 + "" nnoremap <C-w>j :wincmd j \| if winnr() == 1 \| resize +5 \| else \| resize -5 \| endif<CR> 39 + "nnoremap <C-w>k :resize -5<CR> 40 + "nnoremap <C-w>j :resize +5<CR> 53 41 54 - noremap <silent> <c-h> :<C-U>TmuxNavigateLeft<cr> 55 - noremap <silent> <c-j> :<C-U>TmuxNavigateDown<cr> 56 - noremap <silent> <c-k> :<C-U>TmuxNavigateUp<cr> 57 - noremap <silent> <c-l> :<C-U>TmuxNavigateRight<cr> 58 - noremap <silent> <c-t> :<C-U>TmuxNavigatePrevious<cr> 42 + "" Open current directory 43 + "nmap te :tabedit 44 + "nmap <leader>tn :tabnew<Return> 45 + "nmap <S-Tab> :tabprev<Return> 46 + "" Attention, sometimes when you map <Tab> also ctrl+i will change! 47 + ""nmap <Tab> :tabnext<Return> 59 48 60 - " Resize window ABSOLUTE (doing it the same direction wheter in right or left 61 - " split) 62 - nnoremap <C-w>l :if winnr() == winnr('$') \| vertical resize -5 \| else \| vertical resize +5 \| endif<CR> 63 - nnoremap <C-w>h :if winnr() == 1 \| vertical resize -5 \| else \| vertical resize +5 \| endif<CR> 49 + ""nnoremap <Tab> :tabnext<Return> 64 50 65 - " resize window RELATIVE (Haven't found a absoulte way) 66 - " nnoremap <C-w>k :wincmd k \| if winnr() == winnr('$') \| resize -5 \| else \| resize +5 \| endif<CR> 67 - " nnoremap <C-w>j :wincmd j \| if winnr() == 1 \| resize +5 \| else \| resize -5 \| endif<CR> 68 - nnoremap <C-w>k :resize -5<CR> 69 - nnoremap <C-w>j :resize +5<CR> 51 + "" Find files using Telescope command-line sugar. --> replaced by fzf as faster and more options such as search :Lines :Buffer and .gitignore integration 52 + "" nnoremap <leader>ff <cmd>Telescope find_files<cr> 53 + "" nnoremap <leader>fg <cmd>Telescope live_grep<cr> 54 + "" nnoremap <leader>fb <cmd>Telescope buffers<cr> 55 + "" nnoremap <leader>fh <cmd>Telescope help_tags<cr> 56 + "" nnoremap <C-p> <cmd>Telescope find_files<cr> 70 57 71 - " Open current directory 72 - nmap te :tabedit 73 - nmap <leader>tn :tabnew<Return> 74 - nmap <S-Tab> :tabprev<Return> 75 - " Attention, sometimes when you map <Tab> also ctrl+i will change! 76 - "nmap <Tab> :tabnext<Return> 58 + ""ranger nvim 59 + "" nnoremap <leader>e :RnvimrToggl<CR> 77 60 78 - "nnoremap <Tab> :tabnext<Return> 61 + "" 62 + "" Replace `$EDITOR` candidate with this command to open the selected file 63 + "let g:rnvimr_edit_cmd = 'drop' 79 64 80 - " Find files using Telescope command-line sugar. --> replaced by fzf as faster and more options such as search :Lines :Buffer and .gitignore integration 81 - " nnoremap <leader>ff <cmd>Telescope find_files<cr> 82 - " nnoremap <leader>fg <cmd>Telescope live_grep<cr> 83 - " nnoremap <leader>fb <cmd>Telescope buffers<cr> 84 - " nnoremap <leader>fh <cmd>Telescope help_tags<cr> 85 - " nnoremap <C-p> <cmd>Telescope find_files<cr> 65 + "" 66 + ""let blame default be on 67 + "let g:blamer_enabled = 1 86 68 87 - "ranger nvim 88 - " nnoremap <leader>e :RnvimrToggl<CR> 69 + "" keeping it centered 70 + "nnoremap n nzzzv 71 + "nnoremap N Nzzzv 72 + "nnoremap J mzJ`z 89 73 90 - " 91 - " Replace `$EDITOR` candidate with this command to open the selected file 92 - let g:rnvimr_edit_cmd = 'drop' 74 + "" undo break points 75 + "inoremap , ,<c-g>u 76 + "inoremap . .<c-g>u 77 + "inoremap [ [<c-g>u 78 + "inoremap ( (<c-g>u 93 79 94 - " 95 - "let blame default be on 96 - let g:blamer_enabled = 1 80 + "" jumplist mutations 81 + "nnoremap <expr> k (v:count > 5 ? "m'" . v:count : "") . 'k' 82 + "nnoremap <expr> j (v:count > 5 ? "m'" . v:count : "") . 'j' 83 + "" binding j and k to gj and gk 84 + "nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' 85 + "nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' 97 86 98 - " keeping it centered 99 - nnoremap n nzzzv 100 - nnoremap N Nzzzv 101 - nnoremap J mzJ`z 87 + "" Custom surrounds 88 + "let w:surround_{char2nr('w')} = "```\r```" 89 + "let b:surround_{char2nr('b')} = "**\r**" 102 90 103 - " undo break points 104 - inoremap , ,<c-g>u 105 - inoremap . .<c-g>u 106 - inoremap [ [<c-g>u 107 - inoremap ( (<c-g>u 108 91 109 - " jumplist mutations 110 - nnoremap <expr> k (v:count > 5 ? "m'" . v:count : "") . 'k' 111 - nnoremap <expr> j (v:count > 5 ? "m'" . v:count : "") . 'j' 112 - " binding j and k to gj and gk 113 - nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' 114 - nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' 115 92 116 - " Custom surrounds 117 - let w:surround_{char2nr('w')} = "```\r```" 118 - let b:surround_{char2nr('b')} = "**\r**" 119 93 120 - 121 - 122 - 123 - au! BufWritePost $RC source % " auto source when writing to init.vm alternatively you can run :source $MYVIMRC 94 + "au! BufWritePost $RC source % " auto source when writing to init.vm alternatively you can run :source $MYVIMRC
-1
nvim/lua/sspaeti/init.lua
··· 1 1 require("sspaeti.lazy") 2 2 require("theme.kanagawa") 3 - vim.cmd("source $HOME/.config/nvim/lua/old_config.vim") 4 3 require("sspaeti.set") 5 4 require("sspaeti.remap") 6 5
+7 -7
nvim/lua/sspaeti/lazy-plugs.lua
··· 188 188 { "christoomey/vim-tmux-navigator", lazy = false }, 189 189 { 190 190 "nvim-neo-tree/neo-tree.nvim", 191 - version = "*", 191 + version = "v3.x", 192 192 dependencies = { 193 193 "nvim-lua/plenary.nvim", 194 194 "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended ··· 196 196 }, 197 197 event = "VeryLazy", 198 198 }, 199 - { 200 - 'stevearc/oil.nvim', 201 - event = "VeryLazy", 202 - -- Optional dependencies 203 - dependencies = { "nvim-tree/nvim-web-devicons" }, 204 - }, 199 + -- { 200 + -- 'stevearc/oil.nvim', 201 + -- event = "VeryLazy", 202 + -- -- Optional dependencies 203 + -- dependencies = { "nvim-tree/nvim-web-devicons" }, 204 + -- }, 205 205 { "lukas-reineke/indent-blankline.nvim", event = "VeryLazy" }, 206 206 { "mbbill/undotree", event = "VeryLazy" }, 207 207 {
+79
nvim/lua/sspaeti/remap.lua
··· 175 175 vim.g.netrw_banner = 0 -- disable annoying banner 176 176 vim.g.netrw_browser_split = 4 -- open in previous window 177 177 vim.g.netrw_altv = 1 -- open splits to the right 178 + 179 + 180 + 181 + 182 + 183 + 184 + -- 185 + --converted from old_configs.vim (with ChatGPT - caughtion if something does not work) 186 + -- 187 + 188 + -- fzf: ctrl f for find files 189 + vim.keymap.set('n', '<C-p>', ':Files<CR>') 190 + vim.keymap.set('n', '<leader>fw', ":call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', expand('<cword>')]}))<cr>") 191 + vim.keymap.set('n', '<silent> <Leader>fr', ':Rg<CR>') 192 + vim.keymap.set('n', '<silent> <Leader>fb', ':Buffers<CR>') 193 + vim.keymap.set('n', '<silent> <Leader>f/', ':BLines<CR>') 194 + vim.keymap.set('n', '<silent> <Leader>fm', ':Marks<CR>') 195 + vim.keymap.set('n', '<silent> <Leader>fc', ':Commits<CR>') 196 + vim.keymap.set('n', '<silent> <Leader>fH', ':Helptags<CR>') 197 + vim.keymap.set('n', '<silent> <Leader>fd', ':Rg2 search folder') 198 + 199 + -- find in a specific repo 200 + -- I'm not converting this command because Lua doesn't handle vim commands yet as of my knowledge cut-off in September 2021 201 + vim.cmd[[ 202 + command! -bang -nargs=* Rg2 203 + \ call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".<q-args>, 1, {'dir': system('git -C '.expand('%:p:h').' rev-parse --show-toplevel 2> /dev/null')[:-2]}, <bang>0) 204 + ]] 205 + 206 + -- move window with christoomey/vim-tmux-navigator to align tmux and nvim 207 + vim.g.tmux_navigator_no_mappings = 1 208 + vim.g.tmux_navigator_preserve_zoom = 1 209 + 210 + vim.keymap.set('', '<silent> <c-h>', ':<C-U>TmuxNavigateLeft<cr>') 211 + vim.keymap.set('', '<silent> <c-j>', ':<C-U>TmuxNavigateDown<cr>') 212 + vim.keymap.set('', '<silent> <c-k>', ':<C-U>TmuxNavigateUp<cr>') 213 + vim.keymap.set('', '<silent> <c-l>', ':<C-U>TmuxNavigateRight<cr>') 214 + vim.keymap.set('', '<silent> <c-t>', ':<C-U>TmuxNavigatePrevious<cr>') 215 + 216 + -- Resize window ABSOLUTE (doing it the same direction wheter in right or left split) 217 + vim.keymap.set('n', '<C-w>l', ':if winnr() == winnr(\'$\') \\| vertical resize -5 \\| else \\| vertical resize +5 \\| endif<CR>') 218 + vim.keymap.set('n', '<C-w>h', ':if winnr() == 1 \\| vertical resize -5 \\| else \\| vertical resize +5 \\| endif<CR>') 219 + 220 + -- resize window RELATIVE (Haven't found a absoulte way) 221 + vim.keymap.set('n', '<C-w>k', ':resize -5<CR>') 222 + vim.keymap.set('n', '<C-w>j', ':resize +5<CR>') 223 + 224 + -- Open current directory 225 + vim.keymap.set('n', 'te', ':tabedit') 226 + vim.keymap.set('n', '<leader>tn', ':tabnew<Return>') 227 + vim.keymap.set('n', '<S-Tab>', ':tabprev<Return>') 228 + 229 + -- Replace `$EDITOR` candidate with this command to open the selected file 230 + vim.g.rnvimr_edit_cmd = 'drop' 231 + 232 + -- let blame default be on 233 + vim.g.blamer_enabled = 1 234 + 235 + -- undo break points 236 + vim.keymap.set('i', ',', ',<c-g>u') 237 + vim.keymap.set('i', '.', '.<c-g>u') 238 + vim.keymap.set('i', '[', '[<c-g>u') 239 + vim.keymap.set('i', '(', '(<c-g>u') 240 + 241 + -- jumplist mutations 242 + -- These mappings are not directly convertible to Lua since they involve an expression. 243 + -- Until Neovim's Lua API provides a method to create expression-based mappings, you'll have to use vim.cmd 244 + vim.cmd[[ 245 + nnoremap <expr> k (v:count > 5 ? "m'" . v:count : "") . 'k' 246 + nnoremap <expr> j (v:count > 5 ? "m'" . v:count : "") . 'j' 247 + nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' 248 + nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' 249 + ]] 250 + 251 + -- Custom surrounds 252 + vim.cmd[[ 253 + let w:surround_{char2nr('w')} = "```\r```" 254 + let b:surround_{char2nr('b')} = "**\r**" 255 + ]] 256 +