Skip to content

Instantly share code, notes, and snippets.

@k3muri84
Last active January 28, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k3muri84/fb8e8e28661236afdef60876cccd5a21 to your computer and use it in GitHub Desktop.
Save k3muri84/fb8e8e28661236afdef60876cccd5a21 to your computer and use it in GitHub Desktop.
vim config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'godlygeek/tabular'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'udalov/kotlin-vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
set number
syntax on
set tabstop=4
set shiftwidth=4
set expandtab
set encoding=utf8
set mouse=a
set clipboard+=unnamed
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set shell=sh
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
set visualbell
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
set undofile
set ignorecase
set smartcase
set gdefault
" highligh search
set incsearch
set showmatch
set hlsearch
" clear highlighed
nnoremap <leader><space> :noh<cr>
set wrap
set textwidth=79
set formatoptions=qrn1
set colorcolumn=85
highlight ColorColumn ctermbg=magenta
call matchadd('ColorColumn', '\%81v', 100)
" show invisibles
set list
set listchars=tab:▸\ ,eol:¬
" autosave
au FocusLost * :wa
let mapleader = " "
inoremap jk <ESC>
colo pablo
" shiftless commands
nnoremap ; :
" split vertical
nnoremap <leader>w <C-w>v<C-w>l
autocmd StdinReadPre * let s:std_in=1
" autocmd vimenter * NERDTree
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif
map <C-n> :NERDTreeToggle<CR>
" autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
set rtp+=/usr/local/opt/fzf
map <C-p> :FZF<CR>
" insert date
:nnoremap <C-e> "=strftime("%d. %b %y (%a)")<CR>P
:inoremap <C-e>=strftime("%d. %b %y (%a)")<CR>
" type dts to replace with date
:iab <expr> dts strftime("%d. %b %y (%a)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment