- TMUX: Switched back to ctrl+b as leader

- VIM: Configurations better commented
- NVIM: NVChad, LazyNvim, Old-Config removed
- NVIM: Restarted and reconfigured from kickstart.nvim [WIP]
- Dotfiles on $HOME removed from 160+ to 25. Most of them moved to $XDG_* directories
- Shell: Added back p10k config
- Shell: Autoremove brew left over applications
- Kitty: Added bashrc & profiles for ssh kitten
- Kitty: Custom tab-titles
This commit is contained in:
Pratik Tripathy
2024-01-29 22:35:58 +05:30
parent 0d0620be00
commit 5fa524dd1d
69 changed files with 2984 additions and 1755 deletions

View File

@@ -1,77 +1,65 @@
syntax on " Syntax highlighting.
set nocompatible " Do not worry about backward compatibility with VI
set cursorline " Hightlight cursor line
set showmatch " Highlight matching braces
set noshowmode " Donot write "--INSERT--" etc.
set showcmd " Write out commands on status line
set laststatus=2 " Show a status line
set wrap " Wrap text
set number " Show line numbers
set relativenumber " Relative line numbers
set ruler " Show the line & column number of the cursor
set shortmess+=I " Disable the default Vim startup message.
set shortmess+=s " Less verbose search messages
set mouse+=a " Enable mouse support
set encoding=utf-8 " Encoding
set autoread " Auto reload file if externally changed
set nrformats-=octal " Do not let Ctrl-a + Ctrl-x work on octal format numbers
set formatoptions+=j " When joining lines with J, delete comment characters
set display+=truncate " @@@ is displayed in the 1st column of the last screen line
set tabpagemax=50 " Max number of tabs
set viminfo^=!
set viewoptions-=options
set nolangremap " Do not use non-English keyboards to define keymaps
set list " Show tabs as >, trailing spaces as -, non-breakable space as +
set signcolumn=yes " Always show the signs column (before line number column)
set scrolloff=5 " Cursor always at middle of the screen
set updatetime=249 " No typing for this millisec -> write to swap file
set timeoutlen=500 " Multiple keys in keymaps must be pressed in these millisecs
set noswapfile " Turn off swapfiles
set history=10000 " Number of : commands to save
set undofile " Turn on undofiles (files not compatible across Vim & Nvim
set undolevels=10000 " Number of undos per file (will be stored in memory)
set undoreload=100000 " Amount of memory to use when reloading the buffer with :e!
set sessionoptions-=options " Do NOT save options and mappings in session
set splitbelow " Split new windows at bottom instead of top
set splitright " New vertical windows on right instead of left
set hidden " Allows to change buffer without saving it 1st
set virtualedit=block " Makes visual block better when selecting different line sizes
set ignorecase " When trying to autocomplete commands or searching, ignore case
set noerrorbells novisualbell t_vb= " Disable all bells
" Make sure tabs are 4 character wide
set shiftwidth=4 tabstop=4 softtabstop=4 expandtab smarttab
set autoindent smartindent breakindent " Proper indentation
" Enable searching as you type, rather than waiting till you press enter. Highlight search pattern. Intelligently handle cases in search.
set incsearch hlsearch ignorecase smartcase
" Comments in Grey color and italic
hi Comment guifg=#5C6370 ctermfg=50 cterm=italic
" Better autocompletes
filetype plugin indent on
set omnifunc=syntaxcomplete#Complete
set complete+=kspell
set complete-=i
set completeopt="menuone,noselect"
set wildmenu " List and cycle through autocomplete on <Tab>
set wildignorecase " Case insensitive path completion
set completeopt="menuone,noselect" " Better completion experience
set wildmenu " List and cycle through autocomplete on <Tab>
set wildignorecase " Case insensitive path completion
" Make sure tabs are 4 character wide
set shiftwidth=4 tabstop=4 softtabstop=4 expandtab smarttab
set autoindent smartindent breakindent
syntax on " Syntax highlighting.
syntax enable
set cursorline " Hightlight cursor line
set showmatch " Highlight matching braces
set noshowmode " Donot write "--INSERT--" etc.
set showcmd " Write out commands on status line
set laststatus=2 " Show a status line
set wrap " Wrap text
set number " Show line numbers
set relativenumber " Relative line numbers
set ruler
set shortmess+=I " Disable the default Vim startup message.
set noerrorbells novisualbell t_vb= " Disable audible bell because it's annoying.
set mouse+=a " Enable mouse support
set encoding=utf-8 " Encoding
set autoread
set nrformats-=octal
set formatoptions+=j
set display+=lastline
set display+=truncate
set tabpagemax=50
set viminfo^=!
set viewoptions-=options
set nolangremap
set list
set signcolumn=yes
set scrolloff=5
set isfname+={,},@-@
set updatetime=50
set noswapfile
set history=1000
set undofile
set undolevels=10000
set undoreload=100000
set sessionoptions-=options
set timeoutlen=500
" Vim, by default, won't let you jump to a different file without saving the
" current one. With the below, unsaved files are just hidden.
set hidden
" Enable searching as you type, rather than waiting till you press enter. Highlight search pattern. Intelligently handle cases in search.
set incsearch hlsearch ignorecase smartcase
" Comments in Grey color and italic
hi Comment guifg=#5C6370 ctermfg=50 cterm=italic
" Highlight and remove trailing blank spaces on save
" highlight ExtraWhitespace ctermbg=red guibg=red
" match ExtraWhitespace /\s\+$/
" Remove trailing blank spaces on save
autocmd BufWritePre * %s/\s\+$//e
" Vim is based on Vi. Setting `nocompatible` switches from the default
" Vi-compatibility mode and enables useful Vim functionality. This
" configuration option turns out not to be necessary for the file named
" '~/.vimrc', because Vim automatically enters nocompatible mode if that file
" is present. But we're including it here just in case this config file is
" loaded some other way (e.g. saved as `foo`, and then Vim started with
" `vim -u foo`).
set nocompatible
" Normally, backspace works only if you have made an edit. This fixes that.
set backspace=indent,eol,start
@@ -87,5 +75,4 @@ if !has('gui_running')
set t_Co=256
set termguicolors
hi LineNr ctermbg=NONE guibg=NONE
set termguicolors
endif

View File

@@ -1,3 +1,11 @@
" Make space-bar the leader-key
let mapleader = " "
let maplocalleader = " "
" Don't do anything on pressing space itself
nnoremap <Space> <Nop>
vnoremap <Space> <Nop>
" Disable left, right, up and down keys
" In normal mode...
nnoremap <Left> :echoe "Use h"<CR>
@@ -13,14 +21,6 @@ inoremap <Down> <ESC>:echoe "Use j"<CR>
" Unbind some useless/annoying default key bindings.
nmap Q <Nop>
" Don't do anything on pressing space itself
nnoremap <Space> <Nop>
vnoremap <Space> <Nop>
" Make space-bar the leader-key
let mapleader = " "
let maplocalleader = " "
" Center the cursor when moving through document
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz