-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
106 lines (97 loc) · 2.06 KB
/
vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
set nocompatible
set shiftwidth=4
set tabstop=4
set autoindent
set autoread
set expandtab
set foldmethod=indent
set shell=/bin/bash
set statusline=%<%F\ %h%m%r%=%-14.(%l,%c%V%)\ %P
set laststatus=2
set modelines=0
set encoding=utf-8
set scrolloff=3
set showcmd
set hidden
set wildmenu
set wildmode=list:longest
set visualbell
set ttyfast
set backspace=indent,eol,start
set number
set relativenumber
set undofile
set ignorecase
set smartcase
set gdefault
set incsearch
set hlsearch
syntax on
filetype plugin indent on
"helptags ~/.vim/bundle/vdebug/doc
helptags ~/.vim/bundle/vim-fugitive/doc
"function! Vdebug_config( )
"let g:vdebug_options['path_maps'] = {'/home/vagrant': '/Users/joshuasalisbury/Projects/rsi'}
"let g:vdebug_options['timeout'] = 60
"let g:vdebug_options['break_on_open'] = 0
"endf
function! Cp_filename( )
call setreg('*', getreg('%'))
endf
function! MoveToPrevTab()
"there is only one window
if tabpagenr('$') == 1 && winnr('$') == 1
return
endif
"preparing new window
let l:tab_nr = tabpagenr('$')
let l:cur_buf = bufnr('%')
if tabpagenr() != 1
close!
if l:tab_nr == tabpagenr('$')
tabprev
endif
sp
else
close!
exe "0tabnew"
endif
"opening current buffer in new window
exe "b".l:cur_buf
endfunc
function! MoveToNextTab()
"there is only one window
if tabpagenr('$') == 1 && winnr('$') == 1
return
endif
"preparing new window
let l:tab_nr = tabpagenr('$')
let l:cur_buf = bufnr('%')
if tabpagenr() < tab_nr
close!
if l:tab_nr == tabpagenr('$')
tabnext
endif
sp
else
close!
tabnew
endif
"opening current buffer in new window
exe "b".l:cur_buf
endfunc
let mapleader = ','
nnoremap <leader>yf :call Cp_filename( )<CR>
nnoremap <leader>ta :tab sp<CR>:cd app<CR>:Ack<CR>:cd ..<CR>
nnoremap <leader>tb :tab sp<CR>:Ack<CR>
nnoremap <leader>ad :q<CR>:q<CR>gT
nnoremap <leader><space> :noh<cr>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap / /\v
vnoremap / /\v
execute pathogen#infect()
"let g:toggl_api_token="054b30bd2f4f42dca37bc1b962e5a029"
colorscheme josh