Created
August 6, 2010 21:29
-
-
Save while0pass/512041 to your computer and use it in GitHub Desktop.
my customized settings for vim and bash
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
# For Windows: | |
#alias vi="/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe" | |
#alias vim="/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe" | |
#alias gvim="/c/Program\ Files\ \(x86\)/Vim/vim73/gvim.exe" | |
# For Linux: | |
#alias vi="/usr/bin/gvim" | |
#alias vim="/usr/bin/gvim" | |
#export PYTHONPATH="/home/andrei/repogitories/" | |
alias ls="ls --color=always -AFX --group-directories-first" | |
# For MS Windows without --group-directories-first: | |
#alias ls="ls --color=always -AFX" | |
alias rundj=\ | |
"echo &&"\ | |
"echo 'sass --update static' &&"\ | |
" sass --update static &&"\ | |
"echo &&"\ | |
"echo 'python ./manage.py collectstatic --noinput' &&"\ | |
" python ./manage.py collectstatic --noinput &&"\ | |
"echo &&"\ | |
"echo 'python ./manage.py runserver' &&"\ | |
" python ./manage.py runserver" | |
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" | |
echo succeeded | |
chmod 600 "$SSH_ENV" | |
. "$SSH_ENV" > /dev/null | |
ssh-add | |
} | |
# test for identities | |
function test_identities { | |
# test whether standard identities have been added to the agent already | |
ssh-add -l | grep "The agent has no identities" > /dev/null | |
if [ $? -eq 0 ]; then | |
ssh-add | |
# $SSH_AUTH_SOCK broken so we start a new proper agent | |
if [ $? -eq 2 ];then | |
start_agent | |
fi | |
fi | |
} | |
# check for running ssh-agent with proper $SSH_AGENT_PID | |
if [ -n "$SSH_AGENT_PID" ]; then | |
ps -ef | grep "$SSH_AGENT_PID" | grep ssh-agent > /dev/null | |
if [ $? -eq 0 ]; then | |
test_identities | |
fi | |
# if $SSH_AGENT_PID is not properly set, we might be able to load one from | |
# $SSH_ENV | |
else | |
if [ -f "$SSH_ENV" ]; then | |
. "$SSH_ENV" > /dev/null | |
fi | |
ps -ef | grep "$SSH_AGENT_PID" | grep ssh-agent > /dev/null | |
if [ $? -eq 0 ]; then | |
test_identities | |
else | |
start_agent | |
fi | |
fi |
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
[color] | |
ui = always | |
[core] | |
editor = "C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe -f" ; Windows | |
;editor = "/usr/bin/gvim -f" ; Linux | |
quotepath = false | |
[alias] | |
s = status | |
c = commit | |
a = add | |
d = diff | |
dc = diff --cached | |
l = log | |
ca = commit -a |
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
" vi incompatible mode | |
set nocompatible | |
" syntax highlighting | |
syntax on | |
set encoding=UTF-8 | |
" line numbering is on | |
set nu | |
" line wrap | |
" by word (not by charcter as by default) | |
set wrap | |
set lbr | |
"For MS Windows: | |
set guifont=DejaVu_Sans_Mono:h11:cRUSSIAN | |
"For Linux: | |
"set guifont=DejaVu\ Sans\ Mono\ 12 | |
colorscheme desert | |
" tab width measured in spaces | |
set tabstop=4 | |
set shiftwidth=4 | |
set autoindent | |
set expandtab | |
" displaying tab characters and trailing spaces | |
" with special characters \u2592\u2591 and \u2593 | |
" They also may be '>-' and '@': | |
" :set listchars=tab:>-,trail:@ | |
set lcs=tab:▒░,trail:▓ | |
set list | |
" formatoptions | |
set fo=tcq1 | |
" highlighting results while searching | |
set hlsearch | |
" enabling plugins | |
" Don't forget to install'em all: | |
" * SnipMate | |
" * CSApprox or guicolorscheme | |
" http://stackoverflow.com/questions/1851530/how-to-make-color-settings-look-the-same-in-vim-as-in-gvim | |
" http://vim.wikia.com/wiki/Using_GUI_color_settings_in_a_terminal | |
" http://vim.wikia.com/wiki/256_colors_in_vim | |
filetype plugin on | |
"" Разворачивать окно редактора на весь экран | |
if has('gui') | |
set guioptions-=T " отключить меню в GUI | |
au GUIEnter * :set lines=65535 columns=65535 | |
endif | |
" Переключение на последнюю использованную вкладку по \tl | |
let g:lasttab = 1 | |
nmap <Leader>tl :exe "tabn ".g:lasttab<CR> | |
au TabLeave * let g:lasttab = tabpagenr() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment