Skip to content

Commit 368a49e

Browse files
committed
add dotfiles
1 parent 28d6aa0 commit 368a49e

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

gvimrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
set lines=70 columns=200

vimrc

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
set nocompatible
2+
set nu
3+
set background=dark
4+
set cursorline
5+
set noerrorbells
6+
set clipboard+=unnamed
7+
set mouse=a
8+
set expandtab
9+
set nowrap
10+
set ruler
11+
set hidden
12+
set autoindent
13+
set smartindent
14+
set incsearch
15+
set ignorecase
16+
set smartcase
17+
set tabstop=4
18+
set shiftwidth=4
19+
set softtabstop=4
20+
set showmatch
21+
set showcmd
22+
set title
23+
set wildmenu
24+
set wildmode=list:longest,full
25+
set guioptions-=T
26+
27+
au BufNewFile,BufRead *.thor setfiletype ruby
28+
au BufNewFile,BufRead Thorfile setfiletype ruby
29+
30+
colorscheme desert
31+
syntax on
32+
filetype plugin indent on
33+
nnoremap <space> za
34+
35+
runtime! macros/matchit.vim
36+
37+
let uname = substitute(system("uname"),"\n","","g")
38+
if uname == "Darwin"
39+
command -bar -nargs=1 OpenURL :!open <args>
40+
elseif uname == "Linux"
41+
command -bar -nargs=1 OpenURL :!firefox <args>
42+
endif
43+
44+
if has("autocmd")
45+
" Syntax of these languages is fussy over tabs Vs spaces
46+
autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
47+
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
48+
49+
" strip trailing whitespaces
50+
autocmd FileType java,ruby autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")'))
51+
52+
autocmd FileType ruby setlocal ts=2 sts=2 sw=2 expandtab
53+
autocmd BufReadPost *
54+
\ if line("'\"") > 1 && line("'\"") <= line("$") |
55+
\ exe "normal! g`\"" |
56+
\ endif
57+
endif
58+
59+
let mapleader=','
60+
map <leader>ew :e <C-R>=expand("%:p:h") . "/" <CR>
61+
map <leader>es :sp <C-R>=expand("%:p:h") . "/" <CR>
62+
map <leader>ev :vsp <C-R>=expand("%:p:h") . "/" <CR>
63+
map <leader>et :tabe <C-R>=expand("%:p:h") . "/" <CR>

0 commit comments

Comments
 (0)