basic bash and vim added
This commit is contained in:
commit
09ece8738d
|
@ -0,0 +1,34 @@
|
||||||
|
#
|
||||||
|
# ~/.bashrc
|
||||||
|
#
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
|
||||||
|
set -o vi
|
||||||
|
|
||||||
|
bind 'set show-all-if-ambiguous on'
|
||||||
|
bind 'set completion-ignore-case on'
|
||||||
|
bind 'TAB:menu-complete'
|
||||||
|
|
||||||
|
HISTSIZE=50000
|
||||||
|
HISTFILESIZE=100000
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
bind '"\e[A": history-search-backward'
|
||||||
|
bind '"\e[B": history-search-forward'
|
||||||
|
|
||||||
|
alias clr="clear"
|
||||||
|
|
||||||
|
function mkcd {
|
||||||
|
mkdir "$@" && builtin cd "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
alias cz="cd .. && ls"
|
||||||
|
alias czz="cd ../.. && ls"
|
||||||
|
alias czzz="cd ../../.. && ls"
|
||||||
|
alias czzzz="cd ../../../.. && ls"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
set nocompatible
|
||||||
|
|
||||||
|
colorscheme elflord
|
||||||
|
|
||||||
|
syntax enable
|
||||||
|
|
||||||
|
set showmatch
|
||||||
|
set nu
|
||||||
|
set relativenumber
|
||||||
|
set incsearch
|
||||||
|
set hlsearch
|
||||||
|
set tabstop=2
|
||||||
|
set softtabstop=0
|
||||||
|
set expandtab
|
||||||
|
set shiftwidth=2
|
||||||
|
set smarttab
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
set shell=bash
|
||||||
|
|
||||||
|
nnoremap tn :tabnew<Space>
|
||||||
|
nnoremap tk :tabnext<CR>
|
||||||
|
nnoremap tj :tabprev<CR>
|
||||||
|
nnoremap th :tabfirst<CR>
|
||||||
|
nnoremap tl :tablast<CR>
|
||||||
|
|
||||||
|
let mapleader = ","
|
||||||
|
|
||||||
|
set wrap linebreak nolist
|
||||||
|
|
||||||
|
nnoremap <leader>hl :nohls
|
||||||
|
|
||||||
|
function! Smart_TabComplete()
|
||||||
|
let line = getline('.')
|
||||||
|
let substr = strpart(line, -1, col('.')+1)
|
||||||
|
let substr = matchstr(substr, "[^ \t]*$")
|
||||||
|
if (strlen(substr)==0)
|
||||||
|
return "\<tab>"
|
||||||
|
endif
|
||||||
|
let has_period = match(substr, '\.') != -1
|
||||||
|
let has_slash = match(substr, '\/') != -1
|
||||||
|
if (!has_period && !has_slash)
|
||||||
|
return "\<C-X>\<C-P>"
|
||||||
|
" elseif ( has_slash )
|
||||||
|
else
|
||||||
|
return "\<C-X>\<C-F>"
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
inoremap <tab> <c-r>=Smart_TabComplete()<CR>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue