From 8602e2c89330bc754fcb36c9a4c4c75b2ebf42fe Mon Sep 17 00:00:00 2001 From: Harish Karumuthil Date: Tue, 10 Oct 2023 18:46:05 +0530 Subject: [PATCH 1/4] for switching tabs Remap terminal opening to ts, tv & tf change telescope.defaults.path_display = { "shorten" }; Add tab-switching and moving key map using Ctr+J/K similar to Ctrl+PageUp/Down --- home/.config/alacritty/alacritty.yml | 3 +++ .../neovim-distros/lunarvim/nvim/config.lua | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/home/.config/alacritty/alacritty.yml b/home/.config/alacritty/alacritty.yml index 12db9bf..8c0eb16 100644 --- a/home/.config/alacritty/alacritty.yml +++ b/home/.config/alacritty/alacritty.yml @@ -11,3 +11,6 @@ key_bindings: - { key: Tab, mods: Shift, chars: "\e[Z" } - { key: Tab, mods: Control, chars: "\e[27;5;9~" } - { key: Tab, mods: Control|Shift, chars: "\e[27;6;9~" } + - { key: J, mods: Control|Shift, chars: "\x1b[74;5u" } + - { key: K, mods: Control|Shift, chars: "\x1b[75;5u" } + diff --git a/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua b/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua index 2853536..4c15d09 100644 --- a/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua +++ b/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua @@ -25,6 +25,9 @@ lvim.keys.normal_mode[''] = ":Telescope find_files" -- lvim.keys.normal_mode[""] = ":BufferLineCycleNext" -- lvim.keys.normal_mode[""] = ":BufferLineCyclePrev" +for i = 1, 9, 1 do + lvim.keys.normal_mode[""] = ":BufferLineGoToBuffer " .. i .. "" +end -- -- Use which-key to add extra bindings with the leader-key prefix -- lvim.builtin.which_key.mappings["W"] = { "noautocmd w", "Save without formatting" } @@ -40,6 +43,13 @@ lvim.builtin.nvimtree.setup.view.side = "left" lvim.builtin.nvimtree.setup.renderer.icons.show.git = false + +lvim.builtin.terminal.execs = { + { nil, "ts", "Horizontal Terminal", "horizontal", 0.3 }, + { nil, "tv", "Vertical Terminal", "vertical", 0.4 }, + { nil, "tf", "Float Terminal", "float", nil }, +} + lvim.builtin.lualine.sections.lualine_b = { 'branch', '%f' } @@ -133,6 +143,9 @@ lvim.builtin.telescope.pickers.find_files.mappings = { [''] = actions.smart_send_to_qflist + actions.open_qflist, } } +lvim.builtin.telescope.defaults.path_display = { "shorten" }; + + vim.cmd([[ command! -nargs=+ Gr :silent execute 'grep! -nr "" | copen' @@ -219,6 +232,10 @@ nmap :BufferLineCyclePrev nmap :BufferLineCycleNext nmap :BufferLineMovePrev nmap :BufferLineMoveNext +nmap :BufferLineCyclePrev +nmap :BufferLineCycleNext +nmap :BufferLineMovePrev +nmap :BufferLineMoveNext let g:user_emmet_mode='inv' let g:user_emmet_install_global = 0 From f7915452e94ee3c03c9e36df89c0b75900a18c18 Mon Sep 17 00:00:00 2001 From: Harish Karumuthil Date: Tue, 17 Oct 2023 23:33:44 +0530 Subject: [PATCH 2/4] Added cli to quickly run any linux distro as container --- home/.local/Apps/daily-utils/bin/hari-tools.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/.local/Apps/daily-utils/bin/hari-tools.sh b/home/.local/Apps/daily-utils/bin/hari-tools.sh index 24c5838..11c9144 100755 --- a/home/.local/Apps/daily-utils/bin/hari-tools.sh +++ b/home/.local/Apps/daily-utils/bin/hari-tools.sh @@ -12,6 +12,16 @@ list-commands(){ typeset -F | cut -d ' ' -f 3 | grep -v '^_' | sort } +# dockerLinux [imagename=ubuntu:22.40] . Quick shell inside given linux container +dockerLinux(){ + set -x + local cid=$(($RANDOM%20)) + local name=linux_$cid + local image=${1:-ubuntu:22.04} + docker run -d --name $name $image sh -c "trap : TERM INT; sleep infinity & wait" + docker exec -it $name sh +} + # ts / tsx to js/jsx tstojs(){ set -x From 7534e7dc31555233bad99b54e1cc4c7e140e651c Mon Sep 17 00:00:00 2001 From: Harish Karumuthil Date: Tue, 17 Oct 2023 23:33:53 +0530 Subject: [PATCH 3/4] Updated faker --- home/.node_modules_mine/package.json | 2 +- home/.node_modules_mine/yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/home/.node_modules_mine/package.json b/home/.node_modules_mine/package.json index 6f7b58c..87116aa 100644 --- a/home/.node_modules_mine/package.json +++ b/home/.node_modules_mine/package.json @@ -3,7 +3,7 @@ "@babel/cli": "^7.22.5", "@babel/core": "^7.22.5", "@babel/preset-env": "^7.22.5", - "@faker-js/faker": "^8.0.2", + "@faker-js/faker": "^8.2.0", "@ionic/cli": "^7.1.1", "@nestjs/cli": "^10.1.0", "@openapitools/openapi-generator-cli": "^2.6.0", diff --git a/home/.node_modules_mine/yarn.lock b/home/.node_modules_mine/yarn.lock index 0792d76..f6198ad 100644 --- a/home/.node_modules_mine/yarn.lock +++ b/home/.node_modules_mine/yarn.lock @@ -4184,10 +4184,10 @@ __metadata: languageName: node linkType: hard -"@faker-js/faker@npm:^8.0.2": - version: 8.0.2 - resolution: "@faker-js/faker@npm:8.0.2" - checksum: cf73daf9a50397eb0b3f04a7ef3fbb6f54acc026b167707136a7e58a517fd805a46c9e8c5f017f3022f104a4ff984765daaeee2cb98b3c34646db05c2acad441 +"@faker-js/faker@npm:^8.2.0": + version: 8.2.0 + resolution: "@faker-js/faker@npm:8.2.0" + checksum: febc17018acfb841a348591bfe415e815ea981bf7fa0a12670ac2b449479ad7e9e7b130c42878ec30210da964c13a620a3303dc00d63cb13ded00c6fc701e2be languageName: node linkType: hard @@ -39455,7 +39455,7 @@ __metadata: "@babel/cli": ^7.22.5 "@babel/core": ^7.22.5 "@babel/preset-env": ^7.22.5 - "@faker-js/faker": ^8.0.2 + "@faker-js/faker": ^8.2.0 "@ionic/cli": ^7.1.1 "@nestjs/cli": ^10.1.0 "@openapitools/openapi-generator-cli": ^2.6.0 From 05bb1a04ce3085000f08e887bad7903b3a18f565 Mon Sep 17 00:00:00 2001 From: Harish Karumuthil Date: Thu, 19 Oct 2023 22:44:32 +0530 Subject: [PATCH 4/4] Update --- home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua | 5 +++++ home/.local/Apps/neovim-distros/lunarvim/nvim/lazy-lock.json | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua b/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua index 4c15d09..e560a49 100644 --- a/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua +++ b/home/.local/Apps/neovim-distros/lunarvim/nvim/config.lua @@ -33,8 +33,13 @@ end -- lvim.builtin.which_key.mappings["W"] = { "noautocmd w", "Save without formatting" } -- lvim.builtin.which_key.mappings["P"] = { "Telescope projects", "Projects" } +-- Disable automatic changing of directory in lunarvim +lvim.builtin.project.manual_mode = true +lvim.builtin.project.silent_chdir = false + -- -- Change theme settings -- lvim.colorscheme = "lunar" +-- lvim.builtin.alpha.active = true lvim.builtin.alpha.mode = "dashboard" diff --git a/home/.local/Apps/neovim-distros/lunarvim/nvim/lazy-lock.json b/home/.local/Apps/neovim-distros/lunarvim/nvim/lazy-lock.json index 9024a2d..41c8943 100644 --- a/home/.local/Apps/neovim-distros/lunarvim/nvim/lazy-lock.json +++ b/home/.local/Apps/neovim-distros/lunarvim/nvim/lazy-lock.json @@ -19,7 +19,7 @@ "lir.nvim": { "branch": "master", "commit": "969e95bd07ec315b5efc53af69c881278c2b74fa" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" }, - "markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "2997f467881ac4faa6f8c5e7065e3a672297c8ad" }, "mason.nvim": { "branch": "main", "commit": "a51c2d063c5377ee9e58c5f9cda7c7436787be72" }, "neodev.nvim": { "branch": "main", "commit": "3de41fe4b07443c9f1d75062920dfbb9cd31d641" }, @@ -46,7 +46,7 @@ "telescope.nvim": { "branch": "0.1.x", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, "toggleterm.nvim": { "branch": "main", "commit": "12cba0a1967b4f3f31903484dec72a6100dcf515" }, "tokyonight.nvim": { "branch": "main", "commit": "1ee11019f8a81dac989ae1db1a013e3d582e2033" }, - "vim-fugitive": { "branch": "master", "commit": "99db68d9b3304580bd383da7aaee05c7a954a344" }, + "vim-fugitive": { "branch": "master", "commit": "cbe9dfa162c178946afa689dd3f42d4ea8bf89c1" }, "vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" }, "vim-illuminate": { "branch": "master", "commit": "76f28e858f1caae87bfa45fb4fd09e4b053fc45b" }, "vim-snippets": { "branch": "master", "commit": "ccc2fa1529d372f7ac16d5eb07a385a72b50e05d" },