1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,475 @@ |
1 |
+" |
|
2 |
+" VIMRC - Seb |
|
3 |
+" |
|
4 |
+" |
|
5 |
+" |
|
6 |
+" S'il y a probleme de couleurs, ajouter au .bashrc : |
|
7 |
+" export TERM=xterm-256color |
|
8 |
+" (v�rifier avec 'tput colors' que �a retourne bien 256) |
|
9 |
+" |
|
10 |
+" |
|
11 |
+ |
|
12 |
+" |
|
13 |
+" Docs : |
|
14 |
+" |
|
15 |
+" https://l.messenger.com/l.php?u=https%3A%2F%2Fftp.traduc.org%2Fdoc-vf%2Fgazette-linux%2Fhtml%2F2008%2F152%2Flg152-C.html&h=AT0olcNyj2hovnCwhdEz4TzB0oStACDAEz4dTK6OO9nonvJHHwqrtYMCUeLMolVhdBQz_GN2ciUbAfquT9pgZnK9mi8CmaZTVaQSGzPg1Vv2NdEE-fdc4g07pzmLbxlfqfrvSSmpYMKknXLsLbw |
|
16 |
+" |
|
17 |
+" https://www.tictech.info/post/vim_basic |
|
18 |
+" https://www.tictech.info/post/vim_avance_p1 |
|
19 |
+" https://www.tictech.info/post/vim_avance_p2 |
|
20 |
+" |
|
21 |
+" https://arolla.developpez.com/tutoriels/programmation/editeurs-code/dompter-vim-en-trois-temps/ |
|
22 |
+" https://borntocode.fr/ameliorer-votre-productivite-avec-vim/ |
|
23 |
+" |
|
24 |
+" https://artisan.karma-lab.net/vim-plugins-indispensables |
|
25 |
+" https://vimawesome.com/ |
|
26 |
+" https://medium.com/@brunojorge11/vim-as-php-ide-83310dddbf03 |
|
27 |
+" |
|
28 |
+" https://github.com/ycm-core/YouCompleteMe |
|
29 |
+" |
|
30 |
+" https://github.com/mmozuras/vimfiles/blob/master/vimrc |
|
31 |
+" https://borntocode.fr/ameliorer-votre-productivite-avec-vim/ |
|
32 |
+" https://github.com/JakobGM/dotfiles/blob/master/config/nvim/init.vim |
|
33 |
+" https://gist.github.com/millermedeiros/1262085 |
|
34 |
+" |
|
35 |
+" https://www.youtube.com/watch?v=XA2WjJbmmoM |
|
36 |
+" |
|
37 |
+" |
|
38 |
+ |
|
39 |
+ |
|
40 |
+" |
|
41 |
+" Autres plugins interessants a regarder : |
|
42 |
+" |
|
43 |
+" ludovicchabant/vim-gutentags -- ctags |
|
44 |
+" majutsushi/tagbar -- Menu de ctags |
|
45 |
+" cohama/lexima.vim -- Clos auto les {([ ... |
|
46 |
+" honza/vim-snippets -- Gestion de snippets (template de bouts de code) |
|
47 |
+" Valloric/YouCompleteMe -- Autocompletion |
|
48 |
+" spell correction orthographe |
|
49 |
+" mbbill/undotree |
|
50 |
+" |
|
51 |
+ |
|
52 |
+ |
|
53 |
+ |
|
54 |
+ |
|
55 |
+ |
|
56 |
+ |
|
57 |
+ |
|
58 |
+ |
|
59 |
+" |
|
60 |
+" MEMO DES COMMANDES |
|
61 |
+" |
|
62 |
+" |
|
63 |
+ |
|
64 |
+" ** Plugins |
|
65 |
+" :PlugInstall -- Installer les plugins ajoutes dans la liste ci-dessous |
|
66 |
+" :PlugClean -- Nettoyer les plugins supprimes de la liste |
|
67 |
+" :PlugUpdate -- Update les plugins installes |
|
68 |
+ |
|
69 |
+" ** Souris |
|
70 |
+" <Shift><Mouse-Selection> -- Pour copier du texte |
|
71 |
+" <Shift><Mouse-Right> -- Coller du texte |
|
72 |
+ |
|
73 |
+" ** Touches initiales |
|
74 |
+" i / a -- Passer en mode insertion |
|
75 |
+" A -- Passer en mode insertion a la fin de la ligne |
|
76 |
+" d / y / p -- Delete / Yank / Paste |
|
77 |
+" o / O -- Ajoute une ligne vide dessous/dessus |
|
78 |
+" w / W -- Se deplacer de mot/MOT en mot/MOT |
|
79 |
+" % -- Passer de l'ouverture a la fermeture d'un ({[ <=> ]}) |
|
80 |
+" :w/<filename> -- Enregistrer sous |
|
81 |
+ |
|
82 |
+" ** Folds |
|
83 |
+" zf3j -- Creer un fold des 3 lignes en dessous |
|
84 |
+" za -- Toggle le fold |
|
85 |
+" zM / zR -- Ferme/Ouvre tous les folds |
|
86 |
+" zd / zE -- Supprime un/tous les fold(s) |
|
87 |
+ |
|
88 |
+" ** Completion |
|
89 |
+" C-n / C-p -- Lister les completions possibles |
|
90 |
+" C-i C-o -- Omni-completion |
|
91 |
+ |
|
92 |
+" ** Marques |
|
93 |
+" ma -- Poser le marqueur 'a' |
|
94 |
+" 'a -- Aller au marqueur 'a' |
|
95 |
+" :marks -- Lister les marqueurs |
|
96 |
+ |
|
97 |
+" ** Persos |
|
98 |
+" ; -- Ajoute un ';' en fin de ligne |
|
99 |
+" |
|
100 |
+" C-f / <leader><Up> -- Cree un fold ?{ to %} |
|
101 |
+" <leader><Down> -- Cree un fold /{ to %} |
|
102 |
+" <F9> -- Toogle fold |
|
103 |
+" <leader><PageUp> -- Ferme tous les folds |
|
104 |
+" <leader><PageDown> -- Ouvre tous les folds |
|
105 |
+" |
|
106 |
+" <F7> -- Syntaxe : Infos |
|
107 |
+" <F8> -- Syntaxe : Errors |
|
108 |
+" |
|
109 |
+" <leader><Left>/<Right> -- Ajoute/Enleve 1 indentation |
|
110 |
+" |
|
111 |
+" <leader>q -- Quitte et cree une session |
|
112 |
+" <leader>d -- Supprime la session en cours |
|
113 |
+" <leader>w -- Enregistre tous les onglets |
|
114 |
+" |
|
115 |
+" <leader><leader> -- Commente la ligne |
|
116 |
+" |
|
117 |
+" <leader>e -- Toogle NerdTree |
|
118 |
+" |
|
119 |
+" <F3>/<leader>t -- Cree un nouvel onglet, et ouvre NerdTree |
|
120 |
+" <F2>/<F4> -- Navigue dans les tab |
|
121 |
+" <leader><F2>/<F4> -- Deplace le tab courant |
|
122 |
+" |
|
123 |
+" <F12> -- Paste Toggle : Desactive l'autoindent pour coller du code |
|
124 |
+" |
|
125 |
+" <ESC><ESC> -- Quitter le search highlighting |
|
126 |
+" |
|
127 |
+" <TAB> -- Autocompletion |
|
128 |
+ |
|
129 |
+" ** Plugin : NerdTree |
|
130 |
+" m -- Affiche le menu pour creer/deplacer/suppimer des fichiers/repertoies |
|
131 |
+ |
|
132 |
+" ** Plugin : Vimagit |
|
133 |
+" <F6>/:Magit -- Affiche l'interface. Puis commandes : |
|
134 |
+" S -- Pour staged une modif |
|
135 |
+" CC -- Commit (mettre le commentaire puis refaire CC) |
|
136 |
+" q -- Quitter Magit |
|
137 |
+" |
|
138 |
+ |
|
139 |
+" ** Plugin : Gitgutter |
|
140 |
+" ]c / [c -- Aller a la suivante/precedente modification (map <MON SHORTCUT> <Plug>(GitGutterNextHunk) / PrevHunk) |
|
141 |
+" <leader>hs -- Stage la modif |
|
142 |
+" <leader>hu -- Annuler la modif |
|
143 |
+ |
|
144 |
+ |
|
145 |
+ |
|
146 |
+" |
|
147 |
+" PLUGINS |
|
148 |
+" |
|
149 |
+ |
|
150 |
+ |
|
151 |
+"https://github.com/junegunn/vim-plug |
|
152 |
+"Deploie l'environnement vim avec installation des plugins, |
|
153 |
+" si c'est le premier lancement de ce vimrc |
|
154 |
+if empty(glob('~/.vim/autoload/plug.vim')) |
|
155 |
+ silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs |
|
156 |
+ \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |
|
157 |
+ autocmd VimEnter * PlugInstall --sync | source $MYVIMRC |
|
158 |
+endif |
|
159 |
+ |
|
160 |
+call plug#begin('~/.vim/plugged') " Debut de chargement des plugins |
|
161 |
+ |
|
162 |
+Plug 'scrooloose/syntastic' " Verif de la syntaxe du code |
|
163 |
+Plug 'preservim/nerdtree' " Navigateur de fichiers |
|
164 |
+"Plug 'majutsushi/tagbar' " Barre d'affichage des objets du code en cours |
|
165 |
+"Plug 'ycm-core/YouCompleteMe' " Autocompletion de code |
|
166 |
+Plug 'mhinz/vim-startify' " Gestion des sessions |
|
167 |
+ |
|
168 |
+Plug 'tpope/vim-fugitive' " Git plugin with commands 'G<command>' |
|
169 |
+Plug 'jreybert/vimagit' " Modal git editing with <leader>g |
|
170 |
+Plug 'airblade/vim-gitgutter' " Affiche les symboles de modifs git dans la marge |
|
171 |
+ |
|
172 |
+Plug 'drewtempelmeyer/palenight.vim' " Theme |
|
173 |
+Plug 'itchyny/lightline.vim' " Theme de barre de statut en bas |
|
174 |
+ |
|
175 |
+"Plug 'ryanoasis/vim-devicons' " Lot d'icones pour NerdTree |
|
176 |
+ |
|
177 |
+Plug 'sheerun/vim-polyglot' " Add syntax highlighting for a large range of filetypes |
|
178 |
+"Plug 'cakebaker/scss-syntax.vim' |
|
179 |
+"Plug 'othree/html5.vim' |
|
180 |
+ |
|
181 |
+call plug#end() |
|
182 |
+ |
|
183 |
+ |
|
184 |
+ |
|
185 |
+ |
|
186 |
+ |
|
187 |
+" |
|
188 |
+" TRUE COLORS |
|
189 |
+" |
|
190 |
+ |
|
191 |
+"il faut ajouter 'export TERM=xterm-256color' dans .bashrc |
|
192 |
+"(v�rifier avec 'tput colors' que �a retourne bien 256) |
|
193 |
+if (has("nvim")) |
|
194 |
+ let $NVIM_TUI_ENABLE_TRUE_COLOR=1 |
|
195 |
+endif |
|
196 |
+if (has("termguicolors")) |
|
197 |
+ set termguicolors |
|
198 |
+endif |
|
199 |
+"set t_8b=^[[48;2;%lu;%lu;%lum |
|
200 |
+"set t_8f=^[[38;2;%lu;%lu;%lum |
|
201 |
+ |
|
202 |
+ |
|
203 |
+ |
|
204 |
+ |
|
205 |
+ |
|
206 |
+" |
|
207 |
+" CONFIGURATIONS |
|
208 |
+" |
|
209 |
+ |
|
210 |
+ |
|
211 |
+" Ouvre les fichiers sur plusieurs onglets au lieu de plusieurs buffers |
|
212 |
+if !&diff | silent tab all | tabfirst | endif |
|
213 |
+ |
|
214 |
+set encoding=UTF-8 |
|
215 |
+ |
|
216 |
+set laststatus=2 " Affiche une barre de status en bas de l'�cran |
|
217 |
+set textwidth=0 " Largeur maxi du texte ins�r� : '0' d�sactive la fonction |
|
218 |
+set history=50 " Nombre de commandes dans l'historique |
|
219 |
+set viminfo='20,\"50 " Options du fichier ~/.viminfo |
|
220 |
+set backspace=2 " Active la touche Backspace |
|
221 |
+set scrolloff=5 " Garde toujours X ligne(s) visible(s) � l'�cran au dessus du curseur |
|
222 |
+set showcmd " Affiche les commandes dans la barre de status |
|
223 |
+set showmatch " Affiche la paire de parenth�ses |
|
224 |
+set nostartofline " Essaye de garder le curseur dans la m�me colonne quand on change de ligne |
|
225 |
+ |
|
226 |
+set wildmode=list:full " Option de la compl�tion automatique |
|
227 |
+"set wildmode=list:longest " Option de la compl�tion automatique |
|
228 |
+set wildignore+=*.o,*.obj,*.exe,*.so,*.dll,*.pyc,*.swp,*.jpg,*.png,*.gif,*.pdf,*.bak,.svn,.hg,.bzr,.git, |
|
229 |
+ |
|
230 |
+set nocompatible "use Vim settings, rather than Vi |
|
231 |
+ |
|
232 |
+set incsearch "find the next match as we type the search |
|
233 |
+set hlsearch "highlight searches by default |
|
234 |
+ |
|
235 |
+set ignorecase "set search to be case insensitive |
|
236 |
+set smartcase "unless you typed uppercase letters in your query |
|
237 |
+ |
|
238 |
+set number "add line numbers |
|
239 |
+ |
|
240 |
+syntax on "turn on syntax highlighting |
|
241 |
+ |
|
242 |
+set visualbell t_vb= " Desactive le visualbell |
|
243 |
+ |
|
244 |
+set mouse=a |
|
245 |
+ |
|
246 |
+"Performances |
|
247 |
+set hidden " can put buffer to the background without writing |
|
248 |
+ " to disk, will remember history/marks. |
|
249 |
+set lazyredraw " don't update the display while executing macros |
|
250 |
+set ttyfast " Send more characters at a given time. |
|
251 |
+ |
|
252 |
+ |
|
253 |
+ |
|
254 |
+" |
|
255 |
+" THEME |
|
256 |
+" |
|
257 |
+ |
|
258 |
+set background=dark |
|
259 |
+ |
|
260 |
+colorscheme palenight |
|
261 |
+"let g:lightline = { 'colorscheme': 'palenight' } |
|
262 |
+"let g:airline_theme = "palenight" |
|
263 |
+let g:palenight_terminal_italics=1 |
|
264 |
+ |
|
265 |
+set cursorline " Surligne la ligne en cours |
|
266 |
+set noshowmode " N'affiche pas le mode en cours en bas, vu qu'il est sur la lightline |
|
267 |
+ |
|
268 |
+ |
|
269 |
+"let g:lightline = { 'colorscheme': 'powerline' } |
|
270 |
+let g:lightline = { |
|
271 |
+ \ 'colorscheme': 'wombat', |
|
272 |
+ \ 'active': { |
|
273 |
+ \ 'left': [ [ 'mode', 'paste' ], |
|
274 |
+ \ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ] |
|
275 |
+ \ }, |
|
276 |
+ \ 'component_function': { |
|
277 |
+ \ 'gitbranch': 'FugitiveHead' |
|
278 |
+ \ }, |
|
279 |
+ \ } |
|
280 |
+ |
|
281 |
+ |
|
282 |
+" |
|
283 |
+" INDENTATION & AUTOCOMPLETION |
|
284 |
+" |
|
285 |
+ |
|
286 |
+"indent settings |
|
287 |
+set shiftwidth=2 |
|
288 |
+set tabstop=2 |
|
289 |
+set softtabstop=2 |
|
290 |
+set expandtab |
|
291 |
+set autoindent |
|
292 |
+"set noautoindent |
|
293 |
+"set nocindent |
|
294 |
+"set nosmartindent |
|
295 |
+"set indentexpr= |
|
296 |
+"filetype indent plugin off |
|
297 |
+ |
|
298 |
+ |
|
299 |
+filetype plugin on |
|
300 |
+set omnifunc=syntaxcomplete#Complete |
|
301 |
+set completeopt=menuone |
|
302 |
+"set completeopt=longest,menu,preview |
|
303 |
+ |
|
304 |
+ |
|
305 |
+ |
|
306 |
+"fold settings |
|
307 |
+set foldcolumn=3 |
|
308 |
+set foldmethod=manual |
|
309 |
+"set foldlevel=99 |
|
310 |
+set foldlevelstart=99 |
|
311 |
+autocmd BufWinLeave *.php,*.htm,*.html,*.css,*.c,*.cc,*.h,*.cpp,*.py,*.rb,*.js mkview |
|
312 |
+autocmd BufWinEnter *.php,*.htm,*.html,*.css,*.c,*.cc,*.h,*.cpp,*.py,*.rb,*.js silent loadview |
|
313 |
+ |
|
314 |
+ |
|
315 |
+ |
|
316 |
+ |
|
317 |
+ |
|
318 |
+ |
|
319 |
+" |
|
320 |
+" CONF DES PLUGINS |
|
321 |
+" |
|
322 |
+ |
|
323 |
+let NERDTreeQuitOnOpen=1 |
|
324 |
+let NERDTreeShowHidden=1 |
|
325 |
+ |
|
326 |
+let g:syntastic_always_populate_loc_list = 1 |
|
327 |
+let g:syntastic_check_on_open = 1 |
|
328 |
+let g:syntastic_check_on_wq = 0 |
|
329 |
+ |
|
330 |
+let g:startify_session_persistence = 1 |
|
331 |
+let g:startify_enable_special = 0 |
|
332 |
+let g:startify_files_number = 10 |
|
333 |
+let g:startify_relative_path = 0 |
|
334 |
+let g:startify_change_to_dir = 1 |
|
335 |
+let g:startify_update_oldfiles = 1 |
|
336 |
+let g:startify_session_autoload = 1 |
|
337 |
+let g:startify_custom_header = 'startify#pad([ " VIM - STARTIFY"] + [" [e] Empty file" ])' |
|
338 |
+let g:startify_lists = [ |
|
339 |
+ \ { 'type': 'sessions', 'header': [' Sessions'] }, |
|
340 |
+ \ { 'type': 'files', 'header': [' MRU'] }, |
|
341 |
+ \ { 'type': 'dir', 'header': [' MRU '. getcwd()] }, |
|
342 |
+ \ { 'type': 'bookmarks', 'header': [' Bookmarks'] }, |
|
343 |
+ \ { 'type': 'commands', 'header': [' Commands'] }, |
|
344 |
+ \ ] |
|
345 |
+let g:startify_session_before_save = [ |
|
346 |
+ \ 'echo "Cleaning up before saving.."', |
|
347 |
+ \ 'silent! NERDTreeTabsClose' |
|
348 |
+ \ ] |
|
349 |
+ |
|
350 |
+ |
|
351 |
+function! SessionCreate() |
|
352 |
+ if empty(v:this_session) |
|
353 |
+ if tabpagenr("$") > 1 |
|
354 |
+ SSave! |
|
355 |
+ endif |
|
356 |
+ endif |
|
357 |
+endfunction |
|
358 |
+ |
|
359 |
+ |
|
360 |
+let g:gitgutter_terminal_reports_focus = 0 |
|
361 |
+let g:gitgutter_async = 0 |
|
362 |
+autocmd BufWritePost * GitGutter |
|
363 |
+ |
|
364 |
+ |
|
365 |
+ |
|
366 |
+"let g:tagbar_autofocus=1 |
|
367 |
+ |
|
368 |
+ |
|
369 |
+ |
|
370 |
+" |
|
371 |
+" RACCOURCIS CLAVIER |
|
372 |
+" |
|
373 |
+ |
|
374 |
+set whichwrap=<,>,[,] " Autorise le passage d'une ligne � l'autre avec les fl�ches gauche et droite |
|
375 |
+ |
|
376 |
+" Definition de la touche <leader> |
|
377 |
+let g:mapleader = " " |
|
378 |
+ |
|
379 |
+ |
|
380 |
+ |
|
381 |
+"map <C-x> :TagbarToggle<CR> |
|
382 |
+ |
|
383 |
+map ; A;<ESC> |
|
384 |
+ |
|
385 |
+" Cree un fold du prochain/precedent {, jusqu'au } de fermeture |
|
386 |
+"map <C-f> f{zf%za |
|
387 |
+nmap <C-f> ?{<CR>zf%za:noh<CR> |
|
388 |
+nmap <leader><Down> /{<CR>zf%za:noh<CR> |
|
389 |
+nnoremap <leader><Up> ?{<CR>zf%za:noh<CR> |
|
390 |
+" Toggle le fold en cours |
|
391 |
+nmap <F9> za |
|
392 |
+" Ouvre tous les folds |
|
393 |
+nnoremap <leader><PageDown> zR |
|
394 |
+" Ferme tous les folds |
|
395 |
+nnoremap <leader><PageUp> zM |
|
396 |
+ |
|
397 |
+" Infos de syntaxe |
|
398 |
+nmap <F7> :SyntasticInfo<CR> |
|
399 |
+nmap <F8> :Errors<CR> |
|
400 |
+ |
|
401 |
+ |
|
402 |
+ |
|
403 |
+" Change l'indentation |
|
404 |
+nnoremap <leader><Right> >> |
|
405 |
+vnoremap <leader><Right> >gv |
|
406 |
+nnoremap <leader><Left> << |
|
407 |
+vnoremap <leader><Left> <gv |
|
408 |
+vnoremap < <gv |
|
409 |
+vnoremap > >gv |
|
410 |
+ |
|
411 |
+" Quitte quand plusieurs onglets sont ouverts, et cree une session si elle n'existe pas |
|
412 |
+noremap <leader>q :call SessionCreate()<CR>:qa<CR> |
|
413 |
+" Supprime la session en cours |
|
414 |
+noremap <leader>d :SDelete<CR> |
|
415 |
+ |
|
416 |
+" Enregistre tous les onglets en meme temps |
|
417 |
+noremap <leader>w :wa<CR> |
|
418 |
+ |
|
419 |
+" Commente la ligne courante |
|
420 |
+autocmd VimEnter *.php,*.js,*.c,*.cc,*.h,*.cpp noremap <leader><leader> 0i//<ESC> |
|
421 |
+autocmd VimEnter *.sh noremap <leader><leader> 0i#<ESC> |
|
422 |
+ |
|
423 |
+" Affiche/Cache l'explorateur NerdTree |
|
424 |
+noremap <leader>e :NERDTreeToggle<CR> |
|
425 |
+ |
|
426 |
+ |
|
427 |
+" Creer un nouveau tab et ouvre l'explorateur NerdTree |
|
428 |
+noremap <leader>t :$tabe<CR>:NERDTreeToggle<CR> |
|
429 |
+noremap <F3> :$tabe<CR>:NERDTreeToggle<CR> |
|
430 |
+inoremap <F3> <ESC>:$tabe<CR>:NERDTreeToggle<CR> |
|
431 |
+" Passer au precedent/suivant tab |
|
432 |
+noremap <F2> gT |
|
433 |
+inoremap <F2> <Esc>gT |
|
434 |
+noremap <F4> gt |
|
435 |
+inoremap <F4> <Esc>gt |
|
436 |
+" Deplacer le tab courant vers la gauche/droite |
|
437 |
+noremap <leader><F2> :tabm -1<CR> |
|
438 |
+noremap <leader><F4> :tabm +1<CR> |
|
439 |
+ |
|
440 |
+imap <F10> <C-x><C-o> |
|
441 |
+ |
|
442 |
+" Desactive l'autoindent le temps d'un copier-coller |
|
443 |
+set pastetoggle=<F12> |
|
444 |
+ |
|
445 |
+" Clear search highlighting |
|
446 |
+nnoremap <Esc><Esc> :noh<CR> |
|
447 |
+ |
|
448 |
+ |
|
449 |
+map <F6> :Magit<CR> |
|
450 |
+imap <F6> <Esc>:Magit<CR> |
|
451 |
+ |
|
452 |
+ |
|
453 |
+ |
|
454 |
+" Autocompletion avec la touche <TAB> |
|
455 |
+function! Smart_TabComplete() |
|
456 |
+ let line = getline('.') " current line |
|
457 |
+ |
|
458 |
+ let substr = strpart(line, -1, col('.')+1) " from the start of the current |
|
459 |
+ " line to one character right |
|
460 |
+ " of the cursor |
|
461 |
+ let substr = matchstr(substr, "[^ \t]*$") " word till cursor |
|
462 |
+ if (strlen(substr)==0) " nothing to match on empty string |
|
463 |
+ return "\<tab>" |
|
464 |
+ endif |
|
465 |
+ let has_slash = match(substr, '\/') != -1 " position of slash, if any |
|
466 |
+ if (has_slash) |
|
467 |
+ return "\<C-X>\<C-F>" " file matching |
|
468 |
+ else |
|
469 |
+ return "\<C-X>\<C-O>" " plugin matching |
|
470 |
+ endif |
|
471 |
+endfunction |
|
472 |
+inoremap <tab> <c-r>=Smart_TabComplete()<CR> |
|
473 |
+ |
|
474 |
+ |
|
475 |
+ |