Last active
December 14, 2023 01:31
-
-
Save iamWing/edb71afc8cdec454d4e1e0cfe0e7f825 to your computer and use it in GitHub Desktop.
VIM config from my main MacBook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on " enable syntax highlighting | |
colorscheme desert " set `desert` as default colour scheme | |
set autoindent " indent when moving to the next while writing code | |
set encoding=utf-8 " show output in UTF-8 as YouCompleteMe requires | |
set expandtab " expand tabs into spaces | |
set fileencoding=utf-8 " save file with UTF-8 encoding | |
set fileformat=unix " save file with LF line endings | |
set number " show line numbers | |
set shiftwidth=4 " shift lines by 4 spaces for indent | |
set showmatch " show the matching part of the pair for [] {} & () | |
set softtabstop=4 " for easier backspacing the soft tabs | |
set tabstop=4 " set tabs to have 4 spaces | |
set tws=20x0 " set terminal windows size | |
" split layout | |
set splitbelow | |
set splitright | |
" split navigations | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-w><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" highlight unneccessary whitespaces | |
highlight BadWhitespace ctermbg=yellow guibg=yellow | |
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match | |
\ BadWhitespace /\s\+$/ | |
au BufEnter * if &ft == '' | setlocal colorcolumn= | |
set backspace=indent,eol,start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment