preparation to work with putty-screen
This commit is contained in:
@@ -5,17 +5,47 @@
|
||||
#
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
elif [ -f $HOME/.bashrc.etc ]; then
|
||||
. $HOME/.bashrc.etc
|
||||
else
|
||||
# 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
|
||||
|
||||
#
|
||||
# Don't source the rest twice.
|
||||
#
|
||||
if [ "$BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE" == "true" ]; then
|
||||
return
|
||||
fi
|
||||
export BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE=true
|
||||
#if [ "$BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE" == "true" ]; then
|
||||
# return
|
||||
#fi
|
||||
#export BASHRC_VAHAGNK_DONT_SOURCE_THIS_FILE_TWICE=true
|
||||
|
||||
#
|
||||
# Useful functions.
|
||||
|
||||
26
vim/vimrc
26
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 shiftwidth=4 " for shifting by 4 when pressing tab.
|
||||
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_browse_split = 3 " open in a tab
|
||||
|
||||
@@ -36,8 +36,8 @@ endif
|
||||
" Switch syntax highlighting on, when the terminal has colors
|
||||
" Also switch on highlighting the last used search pattern.
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
syntax on
|
||||
set hlsearch
|
||||
syntax on
|
||||
set hlsearch
|
||||
endif
|
||||
|
||||
" One such option is the 'hidden' option, which allows you to re-use the same
|
||||
@@ -68,6 +68,16 @@ if exists('&number')
|
||||
set number
|
||||
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.
|
||||
if exists('&modeline')
|
||||
set modeline
|
||||
@@ -108,7 +118,7 @@ if has("autocmd")
|
||||
au!
|
||||
|
||||
" 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.
|
||||
" 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 lines=50
|
||||
set columns=85
|
||||
if exists("+spell")
|
||||
set spell
|
||||
endif
|
||||
set encoding=utf-8
|
||||
"set fileencodings=utf-8
|
||||
if exists("+colorcolumn")
|
||||
set colorcolumn=+1 " color textwidth+1-th line
|
||||
endif
|
||||
if has("win32") || has("win64")
|
||||
set guifont=Courier\ AM:h12
|
||||
endif
|
||||
@@ -218,5 +222,7 @@ if has("gui_running")
|
||||
" Open file in a new tab.
|
||||
map <silent> <C-F3> :browse tabnew %:p:h<CR>
|
||||
|
||||
else
|
||||
colors evening
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user