From e2373987efcee649a7d4ee6e6081284e015f239b Mon Sep 17 00:00:00 2001 From: Saeed Afzal Date: Sat, 6 Dec 2025 22:16:09 +0000 Subject: [PATCH] Upload files to "/" --- .vimrc | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .vimrc diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..5919a32 --- /dev/null +++ b/.vimrc @@ -0,0 +1,70 @@ +" Essential +set nocompatible +filetype plugin indent on +set encoding=utf-8 + +" Settings +let mapleader=" " + +set noswapfile +set number relativenumber +set ruler +set noerrorbells +set laststatus=2 +set showmode +set showcmd +set wildmenu +set splitbelow splitright +set hidden + +" Indentation +set expandtab +set smartindent +set shiftwidth=4 +set tabstop=4 +set softtabstop=4 +set list +set listchars="lead:·,tab:··" + +" Search +set ignorecase +set smartcase +set hlsearch +set incsearch +set showmatch + +set wildignore="**/node_modules/**,*.o,*.class" +set path=".,**" + +" Keybindings +imap JJ +nnoremap :bnext +nnoremap :bprevious +nnoremap x :bd! +nnoremap :bnext +nnoremap h :noh +nnoremap :Exp + +" Commands +" Set indent style for current buffer. +function! s:SetIndent(size, use_spaces) abort + let l:size = a:size ==# "" ? 4 : str2nr(a:size) + if l:size <= 0 + let l:size = 4 + endif + + let &l:shiftwidth = l:size + let &l:tabstop = l:size + let &l:softtabstop = l:size + let &l:expandtab = l:size +endfunction + +command! -nargs=? Tabs call s:SetIndent(, 0) +command! -nargs=? Spaces call s:SetIndent(, 1) + +" Autocmd +augroup Custom + autocmd! + autocmd FileType typescript,typescriptreact compiler tsc + autocmd FileType go Tabs 4 +augroup END