feat(rutine commit): fixes in nvim config - add auto tabulator fix at save operation (BufWritePre)
-master
parent
48cd17a29a
commit
3fda06f65e
|
|
@ -33,3 +33,5 @@ pshmrr = !git push --mirror
|
||||||
|
|
||||||
rmtadd = !git remote add
|
rmtadd = !git remote add
|
||||||
rmtsturl = !git remote set-url --add
|
rmtsturl = !git remote set-url --add
|
||||||
|
[http]
|
||||||
|
sslVerify = false
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ call plug#begin()
|
||||||
|
|
||||||
" code formatter
|
" code formatter
|
||||||
" https://github.com/mhartington/formatter.nvim
|
" https://github.com/mhartington/formatter.nvim
|
||||||
Plug 'mhartington/formatter.nvim'
|
Plug 'mhartington/formatter.nvim'
|
||||||
|
|
||||||
" coloured icons & explorer
|
" coloured icons & explorer
|
||||||
" https://github.com/nvim-tree/nvim-tree.lua
|
" https://github.com/nvim-tree/nvim-tree.lua
|
||||||
|
|
@ -106,8 +106,8 @@ call plug#begin()
|
||||||
" https://github.com/davidhalter/jedi-vim
|
" https://github.com/davidhalter/jedi-vim
|
||||||
Plug 'davidhalter/jedi-vim'
|
Plug 'davidhalter/jedi-vim'
|
||||||
|
|
||||||
" jedi-vim not working with 'set paste' option,
|
" jedi-vim not working with 'set paste' option,
|
||||||
" disable it by 'set nopaste' for use this plugin
|
" disable it by 'set nopaste' for use this plugin
|
||||||
|
|
||||||
" tabline plugin with re-orderable, auto-sizing, clickable tabs, icons,
|
" tabline plugin with re-orderable, auto-sizing, clickable tabs, icons,
|
||||||
" nice highlighting, sort-by commands and a magic jump-to-buffer mode
|
" 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'
|
au VimEnter * lua vim.opt.guifont='Hurmit NF:style=bold'
|
||||||
|
|
||||||
" mhartington/formatter.nvim
|
" mhartington/formatter.nvim
|
||||||
" format after save
|
" format after save
|
||||||
|
|
||||||
augroup FormatAutogroup
|
augroup FormatAutogroup
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufWritePost * FormatWrite
|
autocmd BufWritePre * FormatWrite
|
||||||
augroup END
|
autocmd BufReadPost,BufWritePre * :silent %s/\s\+$//ge | :silent %s/\t/ /ge
|
||||||
|
augroup END
|
||||||
|
|
||||||
" loading lua scripts
|
" 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({
|
"au VimEnter * lua require('formatter').setup({
|
||||||
\ logging = false,
|
"\ logging = false,
|
||||||
\ filetype = {
|
"\ filetype = {
|
||||||
\ python = {
|
"\ python = {
|
||||||
\ require('formatter.filetypes.python').black
|
"\ require('formatter.filetypes.python').black
|
||||||
\ },
|
"\ },
|
||||||
\ ["*"] = {
|
"\ ["*"] = {
|
||||||
\ require('formatter.filetypes.any').remove_trailing_whitespace
|
"\ require('formatter.filetypes.any').remove_trailing_whitespace
|
||||||
\ }
|
"\ }
|
||||||
\ }
|
"\ }
|
||||||
\ })
|
"\ })
|
||||||
|
|
||||||
|
|
||||||
" vscode.nvim loading
|
" vscode.nvim loading
|
||||||
|
|
@ -199,10 +203,10 @@ call plug#begin()
|
||||||
au VimEnter * lua vim.o.background = "dark"
|
au VimEnter * lua vim.o.background = "dark"
|
||||||
|
|
||||||
au VimEnter * lua require("vscode").setup({
|
au VimEnter * lua require("vscode").setup({
|
||||||
\
|
\
|
||||||
\ local c = require("vscode.colors").get_colors()
|
\ local c = require("vscode.colors").get_colors()
|
||||||
\
|
\
|
||||||
\ transparent = true,
|
\ transparent = true,
|
||||||
\
|
\
|
||||||
\ italic_comments = true,
|
\ italic_comments = true,
|
||||||
\
|
\
|
||||||
|
|
@ -214,26 +218,26 @@ call plug#begin()
|
||||||
\
|
\
|
||||||
\ group_overrides = {
|
\ group_overrides = {
|
||||||
\ Cursor = {
|
\ Cursor = {
|
||||||
\ fg = c.vscDarkBlue,
|
\ fg = c.vscDarkBlue,
|
||||||
\ bg = c.vscLightGreen,
|
\ bg = c.vscLightGreen,
|
||||||
\ bold = true
|
\ bold = true
|
||||||
\ },
|
\ },
|
||||||
\ },
|
\ },
|
||||||
\ })
|
\ })
|
||||||
|
|
||||||
au VimEnter * lua require("vscode").load()
|
au VimEnter * lua require("vscode").load()
|
||||||
|
|
||||||
|
|
||||||
" bufferline loading
|
" bufferline loading
|
||||||
|
|
||||||
au VimEnter * lua require("bufferline").setup({
|
au VimEnter * lua require("bufferline").setup({
|
||||||
\ ioptions = {
|
\ ioptions = {
|
||||||
\ buffer_close_icon = "",
|
\ buffer_close_icon = "",
|
||||||
\ close_command = "bdelete %d",
|
\ close_command = "bdelete %d",
|
||||||
\ close_icon = "",
|
\ close_icon = "",
|
||||||
\ indicator = {
|
\ indicator = {
|
||||||
\ style = "icon",
|
\ style = "icon",
|
||||||
\ icon = " ",
|
\ icon = " ",
|
||||||
\ },
|
\ },
|
||||||
\ left_trunc_marker = "",
|
\ left_trunc_marker = "",
|
||||||
\ modified_icon = "●",
|
\ modified_icon = "●",
|
||||||
|
|
@ -245,7 +249,7 @@ call plug#begin()
|
||||||
\ },
|
\ },
|
||||||
\ highlights = {
|
\ highlights = {
|
||||||
\ fill = {
|
\ fill = {
|
||||||
\ fg = { attribute = "fg", highlight = "Normal" },
|
\ fg = { attribute = "fg", highlight = "Normal" },
|
||||||
\ bg = { attribute = "bg", highlight = "StatusLineNC" },
|
\ bg = { attribute = "bg", highlight = "StatusLineNC" },
|
||||||
\ },
|
\ },
|
||||||
\ background = {
|
\ background = {
|
||||||
|
|
@ -284,7 +288,7 @@ call plug#begin()
|
||||||
\ fg = { attribute = "fg", highlight = "Normal" },
|
\ fg = { attribute = "fg", highlight = "Normal" },
|
||||||
\ bg = { attribute = "bg", highlight = "Normal" },
|
\ bg = { attribute = "bg", highlight = "Normal" },
|
||||||
\ },
|
\ },
|
||||||
\ },
|
\ },
|
||||||
\ })
|
\ })
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -300,10 +304,10 @@ call plug#begin()
|
||||||
|
|
||||||
au VimEnter * lua require("toggleterm").setup()
|
au VimEnter * lua require("toggleterm").setup()
|
||||||
|
|
||||||
" toggleterm configuration
|
" toggleterm configuration
|
||||||
|
|
||||||
" au VimEnter * lua require("toggleterm.config")
|
" 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
|
" nvimtree loading
|
||||||
|
|
||||||
|
|
@ -336,8 +340,8 @@ call plug#begin()
|
||||||
|
|
||||||
" set tab size
|
" set tab size
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set shiftwidth=4
|
set shiftwidth=4
|
||||||
set expandtab
|
set expandtab
|
||||||
|
|
||||||
" install plugins automatically
|
" install plugins automatically
|
||||||
autocmd VimEnter *
|
autocmd VimEnter *
|
||||||
|
|
@ -374,7 +378,7 @@ call plug#begin()
|
||||||
" files
|
" files
|
||||||
|
|
||||||
" H - shows or hides hidden 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 /.
|
" 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
|
" 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
|
" 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
|
" Ctrl + x - to open the file like the command described above but dividing the buffer horizontally
|
||||||
|
|
||||||
" BarBar shortcuts
|
" BarBar shortcuts
|
||||||
" https://github.com/romgrk/barbar.nvim
|
" https://github.com/romgrk/barbar.nvim
|
||||||
|
|
||||||
" Move to previous/next
|
" Move to previous/next
|
||||||
|
|
||||||
nnoremap <silent> <A-,> <Cmd>BufferPrevious<CR>
|
nnoremap <silent> <A-,> <Cmd>BufferPrevious<CR>
|
||||||
nnoremap <silent> <A-.> <Cmd>BufferNext<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>BufferMovePrevious<CR>
|
||||||
nnoremap <silent> <A->> <Cmd>BufferMoveNext<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-1> <Cmd>BufferGoto 1<CR>
|
||||||
nnoremap <silent> <A-2> <Cmd>BufferGoto 2<CR>
|
nnoremap <silent> <A-2> <Cmd>BufferGoto 2<CR>
|
||||||
nnoremap <silent> <A-3> <Cmd>BufferGoto 3<CR>
|
nnoremap <silent> <A-3> <Cmd>BufferGoto 3<CR>
|
||||||
nnoremap <silent> <A-4> <Cmd>BufferGoto 4<CR>
|
nnoremap <silent> <A-4> <Cmd>BufferGoto 4<CR>
|
||||||
nnoremap <silent> <A-5> <Cmd>BufferGoto 5<CR>
|
nnoremap <silent> <A-5> <Cmd>BufferGoto 5<CR>
|
||||||
nnoremap <silent> <A-6> <Cmd>BufferGoto 6<CR>
|
nnoremap <silent> <A-6> <Cmd>BufferGoto 6<CR>
|
||||||
nnoremap <silent> <A-7> <Cmd>BufferGoto 7<CR>
|
nnoremap <silent> <A-7> <Cmd>BufferGoto 7<CR>
|
||||||
nnoremap <silent> <A-8> <Cmd>BufferGoto 8<CR>
|
nnoremap <silent> <A-8> <Cmd>BufferGoto 8<CR>
|
||||||
nnoremap <silent> <A-9> <Cmd>BufferGoto 9<CR>
|
nnoremap <silent> <A-9> <Cmd>BufferGoto 9<CR>
|
||||||
nnoremap <silent> <A-0> <Cmd>BufferLast<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
|
" Wipeout buffer
|
||||||
" :BufferWipeout
|
" :BufferWipeout
|
||||||
" Close commands
|
" Close commands
|
||||||
" :BufferCloseAllButCurrent
|
" :BufferCloseAllButCurrent
|
||||||
" :BufferCloseAllButVisible
|
" :BufferCloseAllButVisible
|
||||||
" :BufferCloseAllButPinned
|
" :BufferCloseAllButPinned
|
||||||
" :BufferCloseAllButCurrentOrPinned
|
" :BufferCloseAllButCurrentOrPinned
|
||||||
" :BufferCloseBuffersLeft
|
" :BufferCloseBuffersLeft
|
||||||
" :BufferCloseBuffersRight
|
" :BufferCloseBuffersRight
|
||||||
|
|
||||||
" Magic buffer-picking mode
|
" Magic buffer-picking mode
|
||||||
|
|
||||||
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
|
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
|
||||||
nnoremap <silent> <C-p> <Cmd>BufferPickDelete<CR>
|
nnoremap <silent> <C-p> <Cmd>BufferPickDelete<CR>
|
||||||
|
|
||||||
" Sort automatically by...
|
" Sort automatically by...
|
||||||
|
|
||||||
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
|
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
|
||||||
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
|
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
|
||||||
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
|
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
|
||||||
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>
|
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>
|
||||||
|
|
||||||
" Other:
|
" Other:
|
||||||
" :BarbarEnable - enables barbar (enabled by default)
|
" :BarbarEnable - enables barbar (enabled by default)
|
||||||
" :BarbarDisable - very bad command, should never be used
|
" :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>
|
\ 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>
|
inoremap <silent> <A-t> <Esc><Cmd>exe v:count1 . "ToggleTerm"<CR>
|
||||||
|
|
||||||
" Ctrl + \ + Ctrl + n - exit form terminal mode
|
" Ctrl + \ + Ctrl + n - exit form terminal mode
|
||||||
" a - terminal mode (when terminal pane is selected)
|
" a - terminal mode (when terminal pane is selected)
|
||||||
|
|
||||||
" Jedi-vim shortcuts (:help jedi-vim)
|
" Jedi-vim shortcuts (:help jedi-vim)
|
||||||
|
|
||||||
" g:jedi#completions_command Ctrl + Space
|
" g:jedi#completions_command Ctrl + Space
|
||||||
|
|
||||||
" vim-visual-multi - multiline editing shortcuts
|
" vim-visual-multi - multiline editing shortcuts
|
||||||
" https://github.com/mg979/vim-visual-multi/wiki/Quick-start
|
" https://github.com/mg979/vim-visual-multi/wiki/Quick-start
|
||||||
|
|
||||||
" ESC - exit mode
|
" ESC - exit mode
|
||||||
" Ctrl + n - select the word under cursor
|
" Ctrl + n - select the word under cursor
|
||||||
" Ctrl + n - from visual mode, without word boundaries
|
" Ctrl + n - from visual mode, without word boundaries
|
||||||
" Ctrl + Down - create cursors vertically down (works on normal mode only)
|
" Ctrl + Down - create cursors vertically down (works on normal mode only)
|
||||||
" Ctrl + Up - create cursors vertically up (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)
|
" Q - remove region (cusrsor) (works on normal mode only)
|
||||||
" n / N / q - Next / Previous / Skip (works on normal mode only)
|
" n / N / q - Next / Previous / Skip (works on normal mode only)
|
||||||
" \\A - select all occurences of word
|
" \\A - select all occurences of word
|
||||||
" \\/ - create section with regex search
|
" \\/ - create section with regex search
|
||||||
" \\\ - add single cursor at current position
|
" \\\ - add single cursor at current position
|
||||||
" \\gS - reselect set of regions of last VM session
|
" \\gS - reselect set of regions of last VM session
|
||||||
|
|
||||||
" Ctrl + LeftMouse - create a cursor where clicked
|
" Ctrl + LeftMouse - create a cursor where clicked
|
||||||
" Ctrl + RightMouse - select a word where clicked
|
" Ctrl + RightMouse - select a word where clicked
|
||||||
" Alt + Ctrl + RightMouse - create column, from current cursot to clicekd position
|
" 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
|
" Ctrl + Shift + V - paste from windows clipboard
|
||||||
" y - copy from visual mode (after select text (from text editor &
|
" y - copy from visual mode (after select text (from text editor &
|
||||||
" terminal also))
|
" terminal also))
|
||||||
" d - cut --"--
|
" d - cut --"--
|
||||||
" P - paste before cursor (normal mode or visual mode (when you want
|
" P - paste before cursor (normal mode or visual mode (when you want
|
||||||
" replace something)
|
" replace something)
|
||||||
" p - paste after cursor (normal mode or visual mode (when you want
|
" p - paste after cursor (normal mode or visual mode (when you want
|
||||||
" replace something)
|
" replace something)
|
||||||
|
|
||||||
" add some keybindings for - copy / paste / cut (visual mode)
|
" add some keybindings for - copy / paste / cut (visual mode)
|
||||||
" fix vim-visual-multi (select lines is throuble with Ctrl + n)
|
" fix vim-visual-multi (select lines is throuble with Ctrl + n)
|
||||||
" repair Ctrl + v NvimTree Error (it working by ssh via CMD but it
|
" 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 +
|
" doesn't work via VSC integrated terminal - reason can be in Ctrl +
|
||||||
" v binding usage - VSC not apply shotcuts like that and Nvim gets
|
" v binding usage - VSC not apply shotcuts like that and Nvim gets
|
||||||
" errors)
|
" errors)
|
||||||
|
|
||||||
" Initialize plugin system
|
" Initialize plugin system
|
||||||
" - Automatically executes `filetype plugin indent on` and `syntax enable`.
|
" - Automatically executes `filetype plugin indent on` and `syntax enable`.
|
||||||
|
|
|
||||||
|
|
@ -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 add-tbs093a-git-id='eval "$(ssh-agent -s)"; ssh-add ~/.ssh/git_accesses'
|
||||||
|
|
||||||
|
alias k8s=kubectl
|
||||||
|
|
||||||
# Generated for envman. Do not edit.
|
# Generated for envman. Do not edit.
|
||||||
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
|
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue