mirror of
https://github.com/harish2704/dotFiles.git
synced 2026-09-10 07:11:09 +00:00
Initial Commit
This commit is contained in:
+115
@@ -0,0 +1,115 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
export LESS="-R"
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
# if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
# . /etc/bash_completion
|
||||
# fi
|
||||
|
||||
export LD_LIBRARY_PATH=/home/harish/.local/lib
|
||||
#~ export VIMRUNTIME=/home/aswin/.local/share/vim
|
||||
export PATH+=:/home/harish/android-ndk-r6b/
|
||||
export PATH+=:/home/harish/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
|
||||
export PATH=/home/harish/android-sdk-linux/tools:${PATH}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
" set guifont=Monospace\ 10
|
||||
" set guifont=Monaco\ 10
|
||||
" set incsearch " Find as you type search
|
||||
set cursorline " Highlight current line
|
||||
set listchars=tab:›\ ,trail:•,extends:#,nbsp:. " Highlight problematic whitespace
|
||||
colorscheme jellybeans
|
||||
set guioptions-=T
|
||||
set guioptions-=m
|
||||
set guifont=Ubuntu\ Mono\ 12
|
||||
nmap <A-Up> <C-W>k
|
||||
nmap <A-Down> <C-W>j
|
||||
nmap <A-Right> <C-W>l
|
||||
nmap <A-Left> <C-W>h
|
||||
|
||||
imap <A-Up> <ESC><C-W>ki
|
||||
imap <A-Down> <ESC><C-W>ji
|
||||
imap <A-Right> <ESC><C-W>li
|
||||
imap <A-Left> <ESC><C-W>hi
|
||||
|
||||
map ± 1gt
|
||||
map ² 2gt
|
||||
map ³ 3gt
|
||||
map ´ 4gt
|
||||
map µ 5gt
|
||||
map ¶ 6gt
|
||||
map · 7gt
|
||||
map ¸ 8gt
|
||||
|
||||
|
||||
imap ± <ESC>1gti
|
||||
imap ² <ESC>2gti
|
||||
imap ³ <ESC>3gti
|
||||
imap ´ <ESC>4gti
|
||||
imap µ <ESC>5gti
|
||||
imap ¶ <ESC>6gti
|
||||
imap · <ESC>7gti
|
||||
imap ¸ <ESC>8gti
|
||||
|
||||
|
||||
set guitablabel=%N\ %f
|
||||
@@ -0,0 +1,25 @@
|
||||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/python/scripts:$PATH"
|
||||
export PYTHONPATH="$HOME/.local/python/lib"
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
" keyboard {
|
||||
nmap <c-s> :w<CR>
|
||||
vmap <c-s> <Esc><c-s>gv
|
||||
imap <c-s> <Esc><c-s>
|
||||
" map th :tabfirst<CR>
|
||||
" map tn :tabnext<CR>
|
||||
" map tp :tabprev<CR>
|
||||
" map tl :tablast<CR>
|
||||
" map tq :tabclose<CR>
|
||||
map <F8> :TlistToggle<CR>
|
||||
nmap <F2> :wa<Bar>exe "mksession! " . v:this_session<CR>
|
||||
set mouse=a
|
||||
" map <C-J> <C-W>j<ESC>
|
||||
" map <C-K> <C-W>k<ESC>
|
||||
" map <C-L> <C-W>l<ESC>
|
||||
" map <C-H> <C-W>h<ESC>
|
||||
cmap cwd lcd %:p:h
|
||||
cmap cd. lcd %:p:h
|
||||
" set <F13>=[1;3A
|
||||
" set <F14>=[1;3B
|
||||
" set <F15>=[1;3C
|
||||
" set <F16>=[1;3D
|
||||
" imap <F13> <ESC><C-W>ki
|
||||
" imap <F14> <ESC><C-W>ji
|
||||
" imap <F15> <ESC><C-W>li
|
||||
" imap <F16> <ESC><C-W>hi
|
||||
" set <F17>=± " alt-1
|
||||
" set <F18>=² " alt-2
|
||||
" set <F19>=³ " alt-3
|
||||
" set <F20>=´ " alt-4
|
||||
" set <F21>=ä " alt-d
|
||||
" set <F22>=å " alt-e
|
||||
" set <F23>=ã " alt-c
|
||||
" set <F24>=ö " alt-v
|
||||
" set <F25>=
|
||||
" set <F26>=´
|
||||
" imap <F17> <ESC>1gti
|
||||
" imap <F18> <ESC>2gti
|
||||
" imap <F19> <ESC>3gti
|
||||
" imap <F20> <ESC>4gti
|
||||
set timeout timeoutlen=1000 ttimeoutlen=100
|
||||
: " }
|
||||
|
||||
" My settings {
|
||||
" colorscheme elflord
|
||||
let g:ctrlp_user_command = {}
|
||||
let g:ctrlp_working_path_mode = 0
|
||||
let g:ctrlp_custom_ignore = 'node_modules'
|
||||
" let g:neocomplcache_enable_at_startup = 1
|
||||
set clipboard=unnamedplus
|
||||
set history=1000 " Store a ton of history (default is 20)
|
||||
set spell " Spell checking on
|
||||
set hidden " Allow buffer switching without saving
|
||||
set directory=~/.vim/swap//
|
||||
filetype plugin indent on " Automatically detect file types.
|
||||
let NERDSpaceDelims=1
|
||||
set listchars=tab:»\ ,eol:¶,trail:·,precedes:…,extends:…
|
||||
" set list
|
||||
" set sessionoptions=blank,buffers,curdir,folds,tabpages,winsize
|
||||
" au FileType xml setlocal foldmethod=syntax
|
||||
" let g:xml_syntax_folding=1
|
||||
" }
|
||||
|
||||
|
||||
|
||||
" for formating {
|
||||
" set nowrap " Wrap long lines
|
||||
set autoindent " Indent at the same level of the previous line
|
||||
set shiftwidth=4 " Use indents of 4 spaces
|
||||
set expandtab " Tabs are spaces, not tabs
|
||||
set tabstop=4 " An indentation every four columns
|
||||
set softtabstop=4 " Let backspace delete indent
|
||||
" }
|
||||
|
||||
|
||||
|
||||
|
||||
" for UI {
|
||||
|
||||
set showmode " Display the current mode
|
||||
if has('statusline')
|
||||
set laststatus=2
|
||||
|
||||
" Broken down into easily includeable segments
|
||||
set statusline=%w%h%m%r " Options
|
||||
" set statusline+=%{fugitive#statusline()} " Git Hotness
|
||||
set statusline+=\ [%{&ff}/%Y] " Filetype
|
||||
set statusline+=%<%f\ " Filename
|
||||
" set statusline+=\ [%{getcwd()}] " Current dir
|
||||
set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
|
||||
endif
|
||||
|
||||
set backspace=indent,eol,start " Backspace for dummies
|
||||
set linespace=0 " No extra spaces between rows
|
||||
set nu " Line numbers on
|
||||
set showmatch " Show matching brackets/parenthesis
|
||||
set hlsearch " Highlight search terms
|
||||
set winminheight=0 " Windows can be 0 line high
|
||||
set ignorecase " Case insensitive search
|
||||
set smartcase " Case sensitive when uc present
|
||||
set wildmenu " Show list instead of just completing
|
||||
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all.
|
||||
set whichwrap=b,s,h,l,<,>,[,] " Backspace and cursor keys wrap too
|
||||
set scrolljump=5 " Lines to scroll when cursor leaves screen
|
||||
set scrolloff=3 " Minimum lines to keep above and below cursor
|
||||
" set foldenable " Auto fold code
|
||||
set list
|
||||
" }
|
||||
|
||||
|
||||
|
||||
"for Bundle {
|
||||
set nocompatible " be iMproved
|
||||
filetype on " required!
|
||||
set rtp+=~/.vim/bundle/vundle/
|
||||
call vundle#rc()
|
||||
" let Vundle manage Vundle
|
||||
" required!
|
||||
Bundle 'gmarik/vundle'
|
||||
" My Bundles here:
|
||||
"
|
||||
" original repos on github
|
||||
Bundle 'tpope/eclim'
|
||||
Bundle 'tpope/vim-fugitive'
|
||||
Bundle 'Lokaltog/vim-easymotion'
|
||||
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
|
||||
" vim-scripts repos
|
||||
Bundle 'L9'
|
||||
Bundle 'FuzzyFinder'
|
||||
" non github repos
|
||||
Bundle 'git://git.wincent.com/command-t.git'
|
||||
" Bundle 'git://github.com/vim-scripts/YankRing.vim.git'
|
||||
Bundle 'git://github.com/maxbrunsfeld/vim-yankstack.git'
|
||||
" Bundle 'vim-scripts/Auto-Pairs'
|
||||
Bundle 'vim-scripts/DoxygenToolkit.vim'
|
||||
" Bundle 'Raimondi/delimitMate.git'
|
||||
Bundle 'bkad/CamelCaseMotion'
|
||||
" Bundle 'vim-scripts/boxdraw'
|
||||
filetype plugin indent on " required!
|
||||
|
||||
|
||||
" Bundle "vim-scripts/Vim-JDE"
|
||||
" Bundle 'maksimr/vim-jsbeautify'
|
||||
" Bundle "scrooloose/syntastic"
|
||||
" Bundle "pangloss/vim-javascript"
|
||||
Bundle 'scrooloose/nerdcommenter'
|
||||
Bundle 'garbas/vim-snipmate'
|
||||
" Bundle 'amiorin/vim-project'
|
||||
Bundle 'MarcWeber/vim-addon-mw-utils'
|
||||
Bundle 'tomtom/tlib_vim'
|
||||
Bundle 'nathanaelkane/vim-indent-guides'
|
||||
Bundle 'flazz/vim-colorschemes'
|
||||
Bundle 'vim-scripts/sessionman.vim'
|
||||
Bundle 'kien/ctrlp.vim'
|
||||
Bundle 'leshill/vim-json'
|
||||
Bundle 'godlygeek/tabular'
|
||||
Bundle 'majutsushi/tagbar'
|
||||
Bundle 'amirh/HTML-AutoCloseTag'
|
||||
Bundle 'tpope/vim-surround'
|
||||
Bundle 'vim-scripts/AutoComplPop'
|
||||
Bundle 'spf13/vim-autoclose'
|
||||
" Bundle 'Shougo/neocomplcache'
|
||||
|
||||
|
||||
|
||||
"Bundle 'git://github.com/vim-scripts/autoload_cscope.vim.git'
|
||||
Bundle 'honza/vim-snippets'
|
||||
Bundle 'int3/vim-taglist-plus'
|
||||
" Source support_function.vim to support vim-snippets.
|
||||
if filereadable(expand("~/.vim/bundle/vim-snippets/snippets/support_functions.vim"))
|
||||
source ~/.vim/bundle/vim-snippets/snippets/support_functions.vim
|
||||
endif
|
||||
|
||||
" }
|
||||
|
||||
" for JS {
|
||||
let g:html_indent_inctags = "html,body,head,tbody"
|
||||
let g:html_indent_script1 = "inc"
|
||||
let g:html_indent_style1 = "inc"
|
||||
" }
|
||||
|
||||
|
||||
" AutoCloseTag {
|
||||
" Make it so AutoCloseTag works for xml and xhtml files as well
|
||||
au FileType xhtml,xml ru ftplugin/html/autoclosetag.vim
|
||||
nmap <Leader>ac <Plug>ToggleAutoCloseMappings
|
||||
" }
|
||||
" NerdTree {
|
||||
map <C-e> :NERDTreeToggle<CR>:NERDTreeMirror<CR>
|
||||
map <leader>e :NERDTreeFind<CR>
|
||||
nmap <leader>nt :NERDTreeFind<CR>
|
||||
|
||||
let NERDTreeShowBookmarks=1
|
||||
let NERDTreeIgnore=['\.pyc', '\~$', '\.swo$', '\.swp$', '\.git', '\.hg', '\.svn', '\.bzr']
|
||||
let NERDTreeChDirMode=0
|
||||
let NERDTreeQuitOnOpen=1
|
||||
let NERDTreeMouseMode=2
|
||||
let NERDTreeShowHidden=1
|
||||
let NERDTreeKeepTreeInNewTab=1
|
||||
let g:nerdtree_tabs_open_on_gui_startup=0
|
||||
" }
|
||||
|
||||
" Tabularize {
|
||||
nmap <Leader>a& :Tabularize /&<CR>
|
||||
vmap <Leader>a& :Tabularize /&<CR>
|
||||
nmap <Leader>a= :Tabularize /=<CR>
|
||||
vmap <Leader>a= :Tabularize /=<CR>
|
||||
nmap <Leader>a: :Tabularize /:<CR>
|
||||
vmap <Leader>a: :Tabularize /:<CR>
|
||||
nmap <Leader>a:: :Tabularize /:\zs<CR>
|
||||
vmap <Leader>a:: :Tabularize /:\zs<CR>
|
||||
nmap <Leader>a, :Tabularize /,<CR>
|
||||
vmap <Leader>a, :Tabularize /,<CR>
|
||||
vmap <Leader>a// :Tabularize /\/\/<CR>
|
||||
nmap <Leader>a<Bar> :Tabularize /<Bar><CR>
|
||||
vmap <Leader>a<Bar> :Tabularize /<Bar><CR>
|
||||
" }
|
||||
|
||||
" Session List {
|
||||
set sessionoptions=blank,buffers,curdir,tabpages,winsize,resize,winpos
|
||||
nmap <leader>sl :SessionList<CR>
|
||||
nmap <leader>sc :SessionClose<CR>
|
||||
" }
|
||||
|
||||
" JSON {
|
||||
nmap <leader>jt <Esc>:%!python -m json.tool<CR><Esc>:set filetype=json<CR>
|
||||
" }
|
||||
|
||||
" gides {
|
||||
let g:indent_guides_start_level = 2
|
||||
let g:indent_guides_guide_size = 1
|
||||
let g:indent_guides_enable_on_vim_startup = 1
|
||||
" }
|
||||
" colorscheme colorful256
|
||||
" colorscheme mrkn256
|
||||
set wrap
|
||||
colorscheme desert256
|
||||
" set foldmethod=syntax
|
||||
" let javascriptfold=1
|
||||
Reference in New Issue
Block a user