@@ -5,6 +5,12 @@ syntax on
5
5
filetype plugin indent on
6
6
7
7
8
+ " COPY/PASTE
9
+ " ----------
10
+ " Increases the memory limit from 50 lines to 1000 lines
11
+ :set viminfo = '100 ,<1000 ,s10,h
12
+
13
+
8
14
" SOURCING:
9
15
" ---------
10
16
" Automatically reloads .vimrc on write (w)
@@ -48,6 +54,24 @@ set hlsearch
48
54
set ignorecase
49
55
set smartcase
50
56
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
+
51
75
52
76
" WHITESPACE:
53
77
" -----------
@@ -71,12 +95,14 @@ set background=dark
71
95
72
96
" NERDTree (File structure):
73
97
" --------------------------
74
- autocmd VimEnter * NERDTree
75
- autocmd BufWinEnter * NERDTreeMirror
98
+ " autocmd VimEnter * NERDTree
99
+ " autocmd BufWinEnter * NERDTreeMirror
76
100
77
101
" makes NERDTree close automatically if it's the last thing open
78
102
autocmd bufenter * if (winnr (" $" ) == 1 && exists (" b:NERDTreeType" ) && b: NERDTreeType == " primary" ) | q | endif
79
103
104
+ " allows NERDTree to open/close using CNTRL+n
105
+ nnoremap <C-n> :NERDTreeToggle<CR>
80
106
81
107
" INDENTATION:
82
108
" ------------
@@ -88,7 +114,7 @@ vnoremap > >gv
88
114
89
115
" PHP:
90
116
" ----
91
- " Auto Completion (OmniCompletion)
117
+ " Auto Completion (OmniCompletion)
92
118
autocmd FileType php set omnifunc = phpcomplete#CompletePHP
93
119
94
120
@@ -108,4 +134,9 @@ if has("autocmd")
108
134
endif
109
135
syntax on
110
136
" Adds autocompletion via OmniCompletion for Drupal classes, constant definitions, functions, and interfaces
137
+ " User CNTRL+P to access
111
138
: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