Skip to content

Commit 5606247

Browse files
committed
added to .vimrc
1 parent 33b1a38 commit 5606247

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

.vimrc

+34-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ syntax on
55
filetype plugin indent on
66

77

8+
"COPY/PASTE
9+
"----------
10+
"Increases the memory limit from 50 lines to 1000 lines
11+
:set viminfo='100,<1000,s10,h
12+
13+
814
"SOURCING:
915
"---------
1016
"Automatically reloads .vimrc on write (w)
@@ -48,6 +54,24 @@ set hlsearch
4854
set ignorecase
4955
set smartcase
5056

57+
"Control P file search
58+
set runtimepath^=~/.vim/bundle/ctrlp.vim
59+
60+
"List of functions in the current file using Tagbar plugin
61+
nnoremap <C-t> :TagbarToggle<CR>
62+
"Make the cursor go to Tagbar window when it opens
63+
let g:tagbar_autofocus = 1
64+
65+
"List of functions in the current file using Taglist plugin
66+
"Use CNTRL + t to open Taglist Window
67+
nnoremap <C-t><C-l> :TlistToggle<CR>
68+
"Makes it so the cursor appears in the Taglist window when it's opened
69+
let Tlist_GainFocus_On_ToggleOpen = 1
70+
"Closes Taglist window if main window closes
71+
let Tlist_Exit_OnlyWindow = 1
72+
"Use the correct Ctags, which is required for taglist and tagbar
73+
let Tlist_Ctags_Cmd='/usr/local/bin/ctags'
74+
5175

5276
"WHITESPACE:
5377
"-----------
@@ -71,12 +95,14 @@ set background=dark
7195

7296
"NERDTree (File structure):
7397
"--------------------------
74-
autocmd VimEnter * NERDTree
75-
autocmd BufWinEnter * NERDTreeMirror
98+
"autocmd VimEnter * NERDTree
99+
"autocmd BufWinEnter * NERDTreeMirror
76100

77101
"makes NERDTree close automatically if it's the last thing open
78102
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
79103

104+
"allows NERDTree to open/close using CNTRL+n
105+
nnoremap <C-n> :NERDTreeToggle<CR>
80106
81107
"INDENTATION:
82108
"------------
@@ -88,7 +114,7 @@ vnoremap > >gv
88114

89115
"PHP:
90116
"----
91-
"Auto Completion (OmniCompletion)
117+
"Auto Completion (OmniCompletion)
92118
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
93119

94120

@@ -108,4 +134,9 @@ if has("autocmd")
108134
endif
109135
syntax on
110136
"Adds autocompletion via OmniCompletion for Drupal classes, constant definitions, functions, and interfaces
137+
"User CNTRL+P to access
111138
:set tags=~/.vim/tags/drupal
139+
140+
"Points to document with Drupal specific vim settings
141+
autocmd! BufNewFile,BufReadPre,FileReadPre *.module so ~/.vim/drupal.vim
142+
autocmd! BufNewFile,BufReadPre,FileReadPre *.php so ~/.vim/drupal.vim

0 commit comments

Comments
 (0)