feat(rutine commit): fixes in nvim config - add auto tabulator fix at save operation (BufWritePre)

-
master
TBS093A 2023-12-19 18:55:27 +01:00
parent 48cd17a29a
commit 3fda06f65e
3 changed files with 128 additions and 120 deletions

View File

@ -33,3 +33,5 @@ pshmrr = !git push --mirror
rmtadd = !git remote add
rmtsturl = !git remote set-url --add
[http]
sslVerify = false

View File

@ -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 <silent> <A-,> <Cmd>BufferPrevious<CR>
nnoremap <silent> <A-.> <Cmd>BufferNext<CR>
nnoremap <silent> <A-,> <Cmd>BufferPrevious<CR>
nnoremap <silent> <A-.> <Cmd>BufferNext<CR>
" Re-order to previous/next
" Re-order to previous/next
nnoremap <silent> <A-<> <Cmd>BufferMovePrevious<CR>
nnoremap <silent> <A->> <Cmd>BufferMoveNext<CR>
nnoremap <silent> <A-<> <Cmd>BufferMovePrevious<CR>
nnoremap <silent> <A->> <Cmd>BufferMoveNext<CR>
" Goto buffer in position...
" Goto buffer in position...
nnoremap <silent> <A-1> <Cmd>BufferGoto 1<CR>
nnoremap <silent> <A-2> <Cmd>BufferGoto 2<CR>
nnoremap <silent> <A-3> <Cmd>BufferGoto 3<CR>
nnoremap <silent> <A-4> <Cmd>BufferGoto 4<CR>
nnoremap <silent> <A-5> <Cmd>BufferGoto 5<CR>
nnoremap <silent> <A-6> <Cmd>BufferGoto 6<CR>
nnoremap <silent> <A-7> <Cmd>BufferGoto 7<CR>
nnoremap <silent> <A-8> <Cmd>BufferGoto 8<CR>
nnoremap <silent> <A-9> <Cmd>BufferGoto 9<CR>
nnoremap <silent> <A-0> <Cmd>BufferLast<CR>
nnoremap <silent> <A-1> <Cmd>BufferGoto 1<CR>
nnoremap <silent> <A-2> <Cmd>BufferGoto 2<CR>
nnoremap <silent> <A-3> <Cmd>BufferGoto 3<CR>
nnoremap <silent> <A-4> <Cmd>BufferGoto 4<CR>
nnoremap <silent> <A-5> <Cmd>BufferGoto 5<CR>
nnoremap <silent> <A-6> <Cmd>BufferGoto 6<CR>
nnoremap <silent> <A-7> <Cmd>BufferGoto 7<CR>
nnoremap <silent> <A-8> <Cmd>BufferGoto 8<CR>
nnoremap <silent> <A-9> <Cmd>BufferGoto 9<CR>
nnoremap <silent> <A-0> <Cmd>BufferLast<CR>
" Pin/unpin buffer
" Pin/unpin buffer
nnoremap <silent> <A-p> <Cmd>BufferPin<CR>
nnoremap <silent> <A-p> <Cmd>BufferPin<CR>
" Close buffer
" Close buffer
nnoremap <silent> <A-c> <Cmd>BufferClose<CR>
nnoremap <silent> <A-c> <Cmd>BufferClose<CR>
" Restore buffer
" Restore buffer
nnoremap <silent> <A-s-c> <Cmd>BufferRestore<CR>
nnoremap <silent> <A-s-c> <Cmd>BufferRestore<CR>
" 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 <silent> <C-p> <Cmd>BufferPick<CR>
nnoremap <silent> <C-p> <Cmd>BufferPickDelete<CR>
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
nnoremap <silent> <C-p> <Cmd>BufferPickDelete<CR>
" Sort automatically by...
" Sort automatically by...
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>
" 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 <silent><c-t> <Cmd>exe v:count1 . "ToggleTerm"<CR>
nnoremap <silent> <A-t> <Cmd>exe v:count1 . "ToggleTerm"<CR>
nnoremap <silent> <A-t> <Cmd>exe v:count1 . "ToggleTerm"<CR>
inoremap <silent> <A-t> <Esc><Cmd>exe v:count1 . "ToggleTerm"<CR>
" 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`.

View File

@ -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"