aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-12-09 03:57:41 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-12-09 03:57:41 +0300
commit487ada0e059a4faf3f89c409619d50c5cd0e7667 (patch)
tree931ce75c935e94ddb21c66113855d6317952825d /%HOME%
parent.bashrc: make Tilix quiet (diff)
downloadlinux-home-487ada0e059a4faf3f89c409619d50c5cd0e7667.tar.gz
linux-home-487ada0e059a4faf3f89c409619d50c5cd0e7667.zip
.vimrc: disable "editing" directories
Diffstat (limited to '')
-rw-r--r--%HOME%/.vimrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/%HOME%/.vimrc b/%HOME%/.vimrc
index 8dcd2a9..61fd9a6 100644
--- a/%HOME%/.vimrc
+++ b/%HOME%/.vimrc
@@ -83,3 +83,14 @@ set cursorline
" Insert newline without entering insert mode.
nmap <S-Enter> O<Esc>
nmap <CR> o<Esc>
+
+" Disable opening directories, netrw is too confusing.
+" https://unix.stackexchange.com/q/297844
+for f in argv()
+ if isdirectory(f)
+ echomsg "Cowardly refusing to edit directory: " . f
+ quit
+ endif
+endfor
+
+let loaded_netrwPlugin=1