Skip to content

Instantly share code, notes, and snippets.

@andrescuco
Last active July 21, 2022 17:33
Show Gist options
  • Save andrescuco/f4766ffbff97dbce164bb5e51d6badca to your computer and use it in GitHub Desktop.
Save andrescuco/f4766ffbff97dbce164bb5e51d6badca to your computer and use it in GitHub Desktop.
syntax on
set encoding=utf-8
set scrolloff=5
set laststatus=2
set breakindent
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set nowrap
set noswapfile
set nobackup
set belloff=all
set gfn=Fira\ Code\:h18
set guioptions=*
set termguicolors
set noshowmode
set relativenumber
set incsearch
set tags=./tags,tags;
" Move between tags
filetype plugin on
packadd! matchit
" Move lines
nnoremap <C-k> :<C-u>move-2<CR>==
nnoremap <C-j> :<C-u>move+<CR>==
xnoremap <C-k> :move-2<CR>='[gv
xnoremap <C-j> :move'>+<CR>='[gv
" Maximize window
nnoremap <C-w>m :MaximizerToggle<CR>
" Global copy-paste remaps
let g:mapleader=" "
noremap <leader>y "*y
noremap <leader>P "*p
noremap <leader>p :put *<CR>==
" Faster save
noremap <leader>w :up<CR>
" Go to last occurence of word under cursor
noremap <leader>l :vim /\<\>/ % \| clast<CR>
noremap - :Ex<CR>
" File editing shortcuts
nnoremap <leader>e :edit %:p:h/*
nnoremap <leader>f :find *
" File shortcuts
nmap <leader>vrc :vsp ~/.vimrc<CR>
call plug#begin('~/.vim-plugged')
Plug 'haishanh/night-owl.vim'
Plug 'sheerun/vim-polyglot'
Plug 'itchyny/lightline.vim'
Plug 'szw/vim-maximizer'
Plug 'wellle/targets.vim'
Plug 'jiangmiao/auto-pairs'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive'
call plug#end()
colorscheme night-owl
let g:targets_argOpening = '[({[]'
let g:targets_argClosing = '[]})]'
" Lightline config
let g:lightline = {
\ 'colorscheme': 'nightowl',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component': {
\ 'lineinfo': '%3l:%-2v%<',
\ },
\ 'component_function': {
\ 'gitbranch': 'FugitiveHead',
\ 'fileformat': 'LightlineFileformat',
\ 'filetype': 'LightlineFiletype',
\ },
\ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment