preparation to work with putty-screen
This commit is contained in:
@@ -5,17 +5,47 @@
|
|||||||
#
|
#
|
||||||
if [ -f /etc/bashrc ]; then
|
if [ -f /etc/bashrc ]; then
|
||||||
. /etc/bashrc
|
. /etc/bashrc
|
||||||
elif [ -f $HOME/.bashrc.etc ]; then
|
else
|
||||||
. $HOME/.bashrc.etc
|
# System wide functions and aliases
|
||||||
|
# Environment stuff goes in /etc/profile
|
||||||
|
|
||||||
|
# by default, we want this to get set.
|
||||||
|
# Even for non-interactive, non-login shells.
|
||||||
|
if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
|
||||||
|
umask 002
|
||||||
|
else
|
||||||
|
umask 022
|
||||||
|
fi
|
||||||
|
|
||||||
|
# are we an interactive shell?
|
||||||
|
if [ "$PS1" ]; then
|
||||||
|
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'
|
||||||
|
# Turn on checkwinsize
|
||||||
|
shopt -s checkwinsize
|
||||||
|
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! shopt -q login_shell ; then # We're not a login shell
|
||||||
|
for i in /etc/profile.d/*.sh; do
|
||||||
|
if [ -r "$i" ]; then
|
||||||
|
if [ "$PS1" ]; then
|
||||||
|
. $i
|
||||||
|
else
|
||||||
|
. $i &>/dev/null
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
unset i
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Don't source the rest twice.
|
# Don't source the rest twice.
|
||||||
#
|
#
|
||||||
if [ "$BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE" == "true" ]; then
|
#if [ "$BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE" == "true" ]; then
|
||||||
return
|
# return
|
||||||
fi
|
#fi
|
||||||
export BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE=true
|
#export BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE=true
|
||||||
|
|
||||||
#
|
#
|
||||||
# Useful functions.
|
# Useful functions.
|
||||||
|
|||||||
22
vim/vimrc
22
vim/vimrc
@@ -17,7 +17,7 @@ set ruler " show the cursor position all the time
|
|||||||
set tabstop=4 " make tabes to be equal to 4 space chars.
|
set tabstop=4 " make tabes to be equal to 4 space chars.
|
||||||
set shiftwidth=4 " for shifting by 4 when pressing tab.
|
set shiftwidth=4 " for shifting by 4 when pressing tab.
|
||||||
set fileformat=unix " line ending is unix
|
set fileformat=unix " line ending is unix
|
||||||
"set textwidth=90 " 80 char text
|
set textwidth=80 " 80 char text
|
||||||
let g:netrw_preview = 1 " netrw open window to the right
|
let g:netrw_preview = 1 " netrw open window to the right
|
||||||
let g:netrw_browse_split = 3 " open in a tab
|
let g:netrw_browse_split = 3 " open in a tab
|
||||||
|
|
||||||
@@ -68,6 +68,16 @@ if exists('&number')
|
|||||||
set number
|
set number
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Turn on spell check.
|
||||||
|
if exists("+spell")
|
||||||
|
set spell
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Show 80th column.
|
||||||
|
if exists("+colorcolumn")
|
||||||
|
set colorcolumn=+1 " color textwidth+1-th line
|
||||||
|
endif
|
||||||
|
|
||||||
" Modelined are used to configure files.
|
" Modelined are used to configure files.
|
||||||
if exists('&modeline')
|
if exists('&modeline')
|
||||||
set modeline
|
set modeline
|
||||||
@@ -108,7 +118,7 @@ if has("autocmd")
|
|||||||
au!
|
au!
|
||||||
|
|
||||||
" For all text files set 'textwidth' to 78 characters.
|
" For all text files set 'textwidth' to 78 characters.
|
||||||
autocmd FileType text setlocal textwidth=78
|
autocmd FileType text setlocal textwidth=79
|
||||||
|
|
||||||
" When editing a file, always jump to the last known cursor position.
|
" When editing a file, always jump to the last known cursor position.
|
||||||
" Don't do it when the position is invalid or when inside an event handler
|
" Don't do it when the position is invalid or when inside an event handler
|
||||||
@@ -189,14 +199,8 @@ if has("gui_running")
|
|||||||
"set guifont=FreeMono:h12
|
"set guifont=FreeMono:h12
|
||||||
set lines=50
|
set lines=50
|
||||||
set columns=85
|
set columns=85
|
||||||
if exists("+spell")
|
|
||||||
set spell
|
|
||||||
endif
|
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
"set fileencodings=utf-8
|
"set fileencodings=utf-8
|
||||||
if exists("+colorcolumn")
|
|
||||||
set colorcolumn=+1 " color textwidth+1-th line
|
|
||||||
endif
|
|
||||||
if has("win32") || has("win64")
|
if has("win32") || has("win64")
|
||||||
set guifont=Courier\ AM:h12
|
set guifont=Courier\ AM:h12
|
||||||
endif
|
endif
|
||||||
@@ -218,5 +222,7 @@ if has("gui_running")
|
|||||||
" Open file in a new tab.
|
" Open file in a new tab.
|
||||||
map <silent> <C-F3> :browse tabnew %:p:h<CR>
|
map <silent> <C-F3> :browse tabnew %:p:h<CR>
|
||||||
|
|
||||||
|
else
|
||||||
|
colors evening
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user