Last active
February 3, 2021 20:19
-
-
Save GOSHROW/1fb933c7ea7930a6eabb9daad483c447 to your computer and use it in GitHub Desktop.
Gets the job done, effeciently, smoothly and sufficiently
This file contains 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
" If you are new to vimrc, rather than applying these, you might also like to look at VimL for further customizations | |
" Additionaly you can look at swapping tab with capslock just for Vim which I have implemented in my Xsession init | |
syntax on | |
set noeb | |
set nu | |
set ts=4 sts=4 sw=4 et sta | |
set ai | |
set ambw=single | |
set ar | |
set nobk | |
set noswf | |
set nowrap | |
set scs | |
set is | |
set encoding=utf-8 | |
" lightline setup | |
set laststatus=2 | |
set noshowmode | |
set list " Display unprintable characters f12 - switches | |
set listchars=tab:•\ ,trail:•,extends:»,precedes:« " Unprintable chars mapping | |
set undodir=~/.vim/undodir | |
set undofile | |
set colorcolumn=80 | |
call plug#begin('~/.vim/plugged') | |
Plug 'https://github.com/itchyny/lightline.vim.git' | |
Plug 'https://github.com/preservim/nerdtree.git' | |
Plug 'https://github.com/tpope/vim-fugitive.git' | |
Plug 'https://gitlab.com/code-stats/code-stats-vim.git' | |
Plug 'https://github.com/kien/rainbow_parentheses.vim.git' | |
Plug 'https://github.com/ycm-core/YouCompleteMe.git' | |
Plug 'https://github.com/dense-analysis/ale.git' | |
Plug 'https://github.com/mattn/emmet-vim.git' | |
Plug 'https://github.com/flazz/vim-colorschemes.git' | |
call plug#end() | |
colorscheme tir_black | |
" REQUIRED: set your API key | |
let g:codestats_api_key ='SFMyNTY.WjI5emFISnZkdz09IyNNVEl6TlRNPQ.6N4fOmMUGUg0t9rYoxz1grcypaqB84jNP2wLHVtOd6I' | |
" Leading the keymaps | |
let mapleader="\<space>" | |
" move to the split in the direction shown, or create a new split | |
nmap <silent> <leader>h :call WinMove('h')<cr> | |
nmap <silent> <leader>j :call WinMove('j')<cr> | |
nmap <silent> <leader>k :call WinMove('k')<cr> | |
nmap <silent> <leader>l :call WinMove('l')<cr> | |
function! WinMove(key) | |
let t:curwin = winrr() | |
exec "wincmd ".a:key | |
if (t:curwin == winr()) | |
if (match(a:key,'[jk]')) | |
wincmd v | |
else | |
wincmd s | |
endif | |
exec "wincmd ".a:key | |
endif | |
endfunction | |
" autoclose tags | |
inoremap ( ()<Left> | |
inoremap { {}<Left> | |
inoremap [ []<Left> | |
inoremap " ""<Left> | |
" move lines around | |
nnoremap <silent> <leader><Up> :m-2<cr>== | |
nnoremap <silent> <leader><Down> :m+<cr>== | |
xnoremap <silent> <leader><Up> :m-2<cr>gv=gv | |
xnoremap <silent> <leader><Down> :m'>+<cr>gv=gvar | |
nnoremap o o<Esc> | |
" nnoremap O O<Esc> | |
nnoremap <leader><Left> ^ | |
nnoremap <leader><Right> $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment