Skip to content

Instantly share code, notes, and snippets.

@AlexJuarez
Last active July 6, 2020 19:21
Show Gist options
  • Save AlexJuarez/4abe516e88f8849033bf5d8f9110bca0 to your computer and use it in GitHub Desktop.
Save AlexJuarez/4abe516e88f8849033bf5d8f9110bca0 to your computer and use it in GitHub Desktop.
Git and Vim config files
[alias]
s = status --short
cam = commit -a --no-verify -m
cm = commit --no-verify -m
l = !git log --oneline -n 10 --color | cat
aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort
br = branch -av
unstage = reset HEAD --
b = !git branch --color | cat
bd = branch -D
cm = commit --no-verify -m
[user]
name = "Alex Juarez"
email = couatli@gmail.com
[push]
default = current
[mergetool]
keepBackup = true
[credential]
helper = ""
helper = manager-core
[credential "https://dev.azure.com"]
useHttpPath = true
set tabstop=2
set shiftwidth=2
set smarttab
set expandtab
set autoindent
set nocompatible
set relativenumber
set backspace=indent,eol,start
set incsearch
set ignorecase
set smartcase
set hlsearch
nmap \q :noh1search<CR>
nmap <C-e> :e#<CR>
nmap <C-n> :bnext<CR>
nmap <C-p> :bprev<CR>
nmap <C-r> :%s/\<<C-r><C-w>\>//g<Left><Left>
nnoremap j gj
nnoremap k gk
filetype plugin indent on
syntax on
function! SuperCleverTab()
if strpart(getline('.'), 0, col('.') - 1) =~ '^\s*$'
return "\<Tab>"
else
if &omnifunc != ''
return "\<C-X>\<C-O>"
elseif &dictionary != ''
return "\<C-K>"
else
return "\<C-N>"
endif
endif
endfunction
inoremap <Tab> <C-R>=SuperCleverTab()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment