From 3fda06f65e6f5f2e46a0e3e13b63ab187956656d Mon Sep 17 00:00:00 2001 From: TBS093A Date: Tue, 19 Dec 2023 18:55:27 +0100 Subject: [PATCH] feat(rutine commit): fixes in nvim config - add auto tabulator fix at save operation (BufWritePre) - --- git.config/.gitconfig | 2 + vim.config/init.vim | 244 +++++++++++++++++++++--------------------- zsh.config/.zshrc | 2 + 3 files changed, 128 insertions(+), 120 deletions(-) diff --git a/git.config/.gitconfig b/git.config/.gitconfig index ceff5ed..225211e 100644 --- a/git.config/.gitconfig +++ b/git.config/.gitconfig @@ -33,3 +33,5 @@ pshmrr = !git push --mirror rmtadd = !git remote add rmtsturl = !git remote set-url --add +[http] + sslVerify = false diff --git a/vim.config/init.vim b/vim.config/init.vim index e616387..e04c51a 100644 --- a/vim.config/init.vim +++ b/vim.config/init.vim @@ -73,7 +73,7 @@ call plug#begin() " code formatter " https://github.com/mhartington/formatter.nvim - Plug 'mhartington/formatter.nvim' + Plug 'mhartington/formatter.nvim' " coloured icons & explorer " https://github.com/nvim-tree/nvim-tree.lua @@ -106,8 +106,8 @@ call plug#begin() " https://github.com/davidhalter/jedi-vim Plug 'davidhalter/jedi-vim' - " jedi-vim not working with 'set paste' option, - " disable it by 'set nopaste' for use this plugin + " jedi-vim not working with 'set paste' option, + " disable it by 'set nopaste' for use this plugin " tabline plugin with re-orderable, auto-sizing, clickable tabs, icons, " nice highlighting, sort-by commands and a magic jump-to-buffer mode @@ -169,29 +169,33 @@ call plug#begin() au VimEnter * lua vim.opt.guifont='Hurmit NF:style=bold' - " mhartington/formatter.nvim - " format after save + " mhartington/formatter.nvim + " format after save - augroup FormatAutogroup - autocmd! - autocmd BufWritePost * FormatWrite - augroup END + augroup FormatAutogroup + autocmd! + autocmd BufWritePre * FormatWrite + autocmd BufReadPost,BufWritePre * :silent %s/\s\+$//ge | :silent %s/\t/ /ge + augroup END " loading lua scripts - " mhartington/formatter.nvim loading + " mhartington/formatter.nvim loading + " if you want customize formatter for other languages, check this link: + " https://github.com/mhartington/formatter.nvim/tree/master/lua/formatter/filetypes + " and declare like python example: - au VimEnter * lua require('formatter').setup({ - \ logging = false, - \ filetype = { - \ python = { - \ require('formatter.filetypes.python').black - \ }, - \ ["*"] = { - \ require('formatter.filetypes.any').remove_trailing_whitespace - \ } - \ } - \ }) + "au VimEnter * lua require('formatter').setup({ + "\ logging = false, + "\ filetype = { + "\ python = { + "\ require('formatter.filetypes.python').black + "\ }, + "\ ["*"] = { + "\ require('formatter.filetypes.any').remove_trailing_whitespace + "\ } + "\ } + "\ }) " vscode.nvim loading @@ -199,10 +203,10 @@ call plug#begin() au VimEnter * lua vim.o.background = "dark" au VimEnter * lua require("vscode").setup({ - \ - \ local c = require("vscode.colors").get_colors() - \ - \ transparent = true, + \ + \ local c = require("vscode.colors").get_colors() + \ + \ transparent = true, \ \ italic_comments = true, \ @@ -214,26 +218,26 @@ call plug#begin() \ \ group_overrides = { \ Cursor = { - \ fg = c.vscDarkBlue, - \ bg = c.vscLightGreen, - \ bold = true - \ }, + \ fg = c.vscDarkBlue, + \ bg = c.vscLightGreen, + \ bold = true + \ }, \ }, \ }) - au VimEnter * lua require("vscode").load() + au VimEnter * lua require("vscode").load() " bufferline loading au VimEnter * lua require("bufferline").setup({ \ ioptions = { - \ buffer_close_icon = "", + \ buffer_close_icon = "", \ close_command = "bdelete %d", \ close_icon = "", \ indicator = { - \ style = "icon", - \ icon = " ", + \ style = "icon", + \ icon = " ", \ }, \ left_trunc_marker = "", \ modified_icon = "●", @@ -245,7 +249,7 @@ call plug#begin() \ }, \ highlights = { \ fill = { - \ fg = { attribute = "fg", highlight = "Normal" }, + \ fg = { attribute = "fg", highlight = "Normal" }, \ bg = { attribute = "bg", highlight = "StatusLineNC" }, \ }, \ background = { @@ -284,7 +288,7 @@ call plug#begin() \ fg = { attribute = "fg", highlight = "Normal" }, \ bg = { attribute = "bg", highlight = "Normal" }, \ }, - \ }, + \ }, \ }) @@ -300,10 +304,10 @@ call plug#begin() au VimEnter * lua require("toggleterm").setup() - " toggleterm configuration + " toggleterm configuration " au VimEnter * lua require("toggleterm.config") - " au VimEnter * lua vim.cmd("autocmd! TermOpen term://*toggleterm#* lua set_terminal_keymaps()") + " au VimEnter * lua vim.cmd("autocmd! TermOpen term://*toggleterm#* lua set_terminal_keymaps()") " nvimtree loading @@ -336,8 +340,8 @@ call plug#begin() " set tab size set tabstop=4 - set shiftwidth=4 - set expandtab + set shiftwidth=4 + set expandtab " install plugins automatically autocmd VimEnter * @@ -374,7 +378,7 @@ call plug#begin() " files " H - shows or hides hidden files - " I - show ignored files by .gitignore + " I - show ignored files by .gitignore " a - (add) allows the creation of files or folders, creating a folder is done by following the name with the slash /. " E.g. /nvchad/nvimtree.md will create the related markdown file while /nvchad/nvimtree/ will create the nvimtree @@ -401,122 +405,122 @@ call plug#begin() " if there was already an open file this will be displayed side by side with the new file " Ctrl + x - to open the file like the command described above but dividing the buffer horizontally - " BarBar shortcuts - " https://github.com/romgrk/barbar.nvim + " BarBar shortcuts + " https://github.com/romgrk/barbar.nvim - " Move to previous/next + " Move to previous/next - nnoremap BufferPrevious - nnoremap BufferNext + nnoremap BufferPrevious + nnoremap BufferNext - " Re-order to previous/next + " Re-order to previous/next - nnoremap BufferMovePrevious - nnoremap > BufferMoveNext + nnoremap BufferMovePrevious + nnoremap > BufferMoveNext - " Goto buffer in position... + " Goto buffer in position... - nnoremap BufferGoto 1 - nnoremap BufferGoto 2 - nnoremap BufferGoto 3 - nnoremap BufferGoto 4 - nnoremap BufferGoto 5 - nnoremap BufferGoto 6 - nnoremap BufferGoto 7 - nnoremap BufferGoto 8 - nnoremap BufferGoto 9 - nnoremap BufferLast + nnoremap BufferGoto 1 + nnoremap BufferGoto 2 + nnoremap BufferGoto 3 + nnoremap BufferGoto 4 + nnoremap BufferGoto 5 + nnoremap BufferGoto 6 + nnoremap BufferGoto 7 + nnoremap BufferGoto 8 + nnoremap BufferGoto 9 + nnoremap BufferLast - " Pin/unpin buffer + " Pin/unpin buffer - nnoremap BufferPin + nnoremap BufferPin - " Close buffer + " Close buffer - nnoremap BufferClose + nnoremap BufferClose - " Restore buffer + " Restore buffer - nnoremap BufferRestore + nnoremap BufferRestore " Wipeout buffer - " :BufferWipeout - " Close commands - " :BufferCloseAllButCurrent - " :BufferCloseAllButVisible - " :BufferCloseAllButPinned - " :BufferCloseAllButCurrentOrPinned - " :BufferCloseBuffersLeft - " :BufferCloseBuffersRight + " :BufferWipeout + " Close commands + " :BufferCloseAllButCurrent + " :BufferCloseAllButVisible + " :BufferCloseAllButPinned + " :BufferCloseAllButCurrentOrPinned + " :BufferCloseBuffersLeft + " :BufferCloseBuffersRight - " Magic buffer-picking mode + " Magic buffer-picking mode - nnoremap BufferPick - nnoremap BufferPickDelete + nnoremap BufferPick + nnoremap BufferPickDelete - " Sort automatically by... + " Sort automatically by... - nnoremap bb BufferOrderByBufferNumber - nnoremap bd BufferOrderByDirectory - nnoremap bl BufferOrderByLanguage - nnoremap bw BufferOrderByWindowNumber + nnoremap bb BufferOrderByBufferNumber + nnoremap bd BufferOrderByDirectory + nnoremap bl BufferOrderByLanguage + nnoremap bw BufferOrderByWindowNumber - " Other: - " :BarbarEnable - enables barbar (enabled by default) - " :BarbarDisable - very bad command, should never be used + " Other: + " :BarbarEnable - enables barbar (enabled by default) + " :BarbarDisable - very bad command, should never be used - " ToggleTerm shortcuts + " ToggleTerm shortcuts - autocmd TermEnter term://*toggleterm#* + autocmd TermEnter term://*toggleterm#* \ tnoremap exe v:count1 . "ToggleTerm" - nnoremap exe v:count1 . "ToggleTerm" + nnoremap exe v:count1 . "ToggleTerm" inoremap exe v:count1 . "ToggleTerm" - " Ctrl + \ + Ctrl + n - exit form terminal mode - " a - terminal mode (when terminal pane is selected) + " Ctrl + \ + Ctrl + n - exit form terminal mode + " a - terminal mode (when terminal pane is selected) " Jedi-vim shortcuts (:help jedi-vim) " g:jedi#completions_command Ctrl + Space - " vim-visual-multi - multiline editing shortcuts - " https://github.com/mg979/vim-visual-multi/wiki/Quick-start + " vim-visual-multi - multiline editing shortcuts + " https://github.com/mg979/vim-visual-multi/wiki/Quick-start - " ESC - exit mode - " Ctrl + n - select the word under cursor - " Ctrl + n - from visual mode, without word boundaries - " Ctrl + Down - create cursors vertically down (works on normal mode only) - " Ctrl + Up - create cursors vertically up (works on normal mode only) - " Q - remove region (cusrsor) (works on normal mode only) - " n / N / q - Next / Previous / Skip (works on normal mode only) - " \\A - select all occurences of word - " \\/ - create section with regex search - " \\\ - add single cursor at current position - " \\gS - reselect set of regions of last VM session + " ESC - exit mode + " Ctrl + n - select the word under cursor + " Ctrl + n - from visual mode, without word boundaries + " Ctrl + Down - create cursors vertically down (works on normal mode only) + " Ctrl + Up - create cursors vertically up (works on normal mode only) + " Q - remove region (cusrsor) (works on normal mode only) + " n / N / q - Next / Previous / Skip (works on normal mode only) + " \\A - select all occurences of word + " \\/ - create section with regex search + " \\\ - add single cursor at current position + " \\gS - reselect set of regions of last VM session - " Ctrl + LeftMouse - create a cursor where clicked - " Ctrl + RightMouse - select a word where clicked - " Alt + Ctrl + RightMouse - create column, from current cursot to clicekd position + " Ctrl + LeftMouse - create a cursor where clicked + " Ctrl + RightMouse - select a word where clicked + " Alt + Ctrl + RightMouse - create column, from current cursot to clicekd position - " Additional shortcut stuff + " Additional shortcut stuff - " Hold Shift + RightMouseClick (and mouse move for text select) + Enter - copy from vim / nvim to shitty windows clipboard + " Hold Shift + RightMouseClick (and mouse move for text select) + Enter - copy from vim / nvim to shitty windows clipboard " Ctrl + Shift + V - paste from windows clipboard - " y - copy from visual mode (after select text (from text editor & - " terminal also)) - " d - cut --"-- - " P - paste before cursor (normal mode or visual mode (when you want - " replace something) - " p - paste after cursor (normal mode or visual mode (when you want - " replace something) + " y - copy from visual mode (after select text (from text editor & + " terminal also)) + " d - cut --"-- + " P - paste before cursor (normal mode or visual mode (when you want + " replace something) + " p - paste after cursor (normal mode or visual mode (when you want + " replace something) - " add some keybindings for - copy / paste / cut (visual mode) - " fix vim-visual-multi (select lines is throuble with Ctrl + n) - " repair Ctrl + v NvimTree Error (it working by ssh via CMD but it - " doesn't work via VSC integrated terminal - reason can be in Ctrl + - " v binding usage - VSC not apply shotcuts like that and Nvim gets - " errors) + " add some keybindings for - copy / paste / cut (visual mode) + " fix vim-visual-multi (select lines is throuble with Ctrl + n) + " repair Ctrl + v NvimTree Error (it working by ssh via CMD but it + " doesn't work via VSC integrated terminal - reason can be in Ctrl + + " v binding usage - VSC not apply shotcuts like that and Nvim gets + " errors) " Initialize plugin system " - Automatically executes `filetype plugin indent on` and `syntax enable`. diff --git a/zsh.config/.zshrc b/zsh.config/.zshrc index 6b26b36..cba1a64 100644 --- a/zsh.config/.zshrc +++ b/zsh.config/.zshrc @@ -107,6 +107,8 @@ alias tmux-session=/root/linux.config/tmux.config/tmux.session.sh alias add-tbs093a-git-id='eval "$(ssh-agent -s)"; ssh-add ~/.ssh/git_accesses' +alias k8s=kubectl + # Generated for envman. Do not edit. [ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"