File tree 3 files changed +0
-19
lines changed
3 files changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ include:
17
17
[ guard] [ ] .
18
18
* ` :SudoWrite ` : Write a privileged file with ` sudo ` .
19
19
* ` :SudoEdit ` : Edit a privileged file with ` sudo ` .
20
- * File type detection for ` sudo -e ` is based on original file name.
21
20
* Typing a shebang line causes the file type to be re-detected. Additionally
22
21
the file will be automically made executable (` chmod +x ` ) after the next
23
22
write.
Original file line number Diff line number Diff line change @@ -85,9 +85,6 @@ COMMANDS *eunuch-commands*
85
85
86
86
PASSIVE BEHAVIORS *eunuch-passive*
87
87
88
- File type detection for files edited with `sudoedit` and `sudo -e` happens
89
- based on the original file name, as found in $SUDO_COMMAND.
90
-
91
88
If you type a line at the beginning of a file that starts with #! and press
92
89
<CR> , The current file type will be re-detected. This is implemented using a
93
90
<CR> map. If you already have a <CR> map, you can incorporate this behavior
Original file line number Diff line number Diff line change @@ -279,21 +279,6 @@ command! -bar SudoWrite
279
279
\ write !
280
280
endif
281
281
282
- function ! s: SudoEditInit () abort
283
- let files = split ($SUDO_COMMAND , ' ' )[1 :-1 ]
284
- if len (files ) == # argc ()
285
- for i in range (argc ())
286
- execute ' autocmd BufEnter' fnameescape (argv (i ))
287
- \ ' if empty(&filetype) || &filetype ==# "conf"'
288
- \ ' |doautocmd filetypedetect BufReadPost' fnameescape (files [i ])
289
- \ ' |endif'
290
- endfor
291
- endif
292
- endfunction
293
- if $SUDO_COMMAND = ~# ' ^sudoedit '
294
- call s: SudoEditInit ()
295
- endif
296
-
297
282
command ! - bar -nargs =? Wall
298
283
\ if empty (<q-args> ) |
299
284
\ call s: Wall () |
You can’t perform that action at this time.
0 commit comments