aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/copy_linebreak.vim5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugin/copy_linebreak.vim b/plugin/copy_linebreak.vim
index 85c823d..ac0f3cf 100644
--- a/plugin/copy_linebreak.vim
+++ b/plugin/copy_linebreak.vim
@@ -5,10 +5,7 @@
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
-if exists('loaded_copy_linebreak') || &compatible
- finish
-endif
-if v:version < 700
+if exists('loaded_copy_linebreak') || &compatible || v:version < 700
finish
endif
let loaded_copy_linebreak = 1
019-06-19 15:24:01 +1200 committer Tom Ryder <tom@sanctum.geek.nz> 2019-06-19 15:24:01 +1200 Move 'foldmethod' definitions out to filetypes' href='/cgit/dotfiles.git/commit/vim/after/ftplugin/php.vim?h=uuuu&id=352e2b820167ff2377350683a88a69af803be78c'>352e2b82
cc2cd38d

352e2b82
ab3a40ee



95f89832



9929ca9e


2bcce635
c4dc71a5












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

                                    
                                                  




                                              
 


                                        
                                                           
 
                                                           
                          

                                                         
 



                                              



                                                        


                                                 
     












                                                        
" Use PHP itself for syntax checking
compiler php
let b:undo_ftplugin .= '|unlet b:current_compiler'
      \ . '|setlocal errorformat< makeprg<'
if executable('php-cs-fixer')
  setlocal equalprg=phpcsff
  let b:undo_ftplugin .= '|setlocal equalprg<'
endif

" Set comment formats
setlocal comments=s1:/*,m:*,ex:*/,://,:#
setlocal formatoptions+=or
let b:undo_ftplugin .= '|setlocal comments< formatoptions<'

" Fold based on indent level, but start with all folds open
setlocal foldmethod=indent
setlocal foldlevel=99
let b:undo_ftplugin .= '|setlocal foldmethod< foldlevel<'

" Use pman as 'keywordprg'
setlocal keywordprg=pman
let b:undo_ftplugin .= '|setlocal keywordprg<'

" Specify ERE regex (close to PCRE) for regex_escape.vim
let b:regex_escape_flavor = 'ere'
let b:undo_ftplugin .= '|unlet b:regex_escape_flavor'

" Set HTML as an alternative filetype
if !exists('b:alternate_filetypes')
  let b:alternate_filetypes = [&filetype, 'html']
endif

" Stop here if the user doesn't want ftplugin mappings
if exists('no_plugin_maps') || exists('no_php_maps')
  finish
endif

" Mappings to choose 'equalprg'
nnoremap <buffer> <LocalLeader>f
      \ :<C-U>setlocal equalprg=phpcsff<CR>
nnoremap <buffer> <LocalLeader>i
      \ :<C-U>setlocal equalprg<<CR>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>f'
      \ . '|nunmap <buffer> <LocalLeader>i'