aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
authorSimon Ruderich <simon@ruderich.org>2010-10-08 23:29:08 +0000
committerSimon Ruderich <simon@ruderich.org>2010-10-08 23:29:08 +0000
commitda1f8fac4198a8fa88f9e5e61e1fd1283b914b50 (patch)
tree8c4be4361d83619b7597bf53aeeecb2a4122bac0 /vim-mode/vim_mode.pl
parentvim_mode: Fix :mkv[imrc]. (diff)
downloadirssi-scripts-da1f8fac4198a8fa88f9e5e61e1fd1283b914b50.tar.gz
irssi-scripts-da1f8fac4198a8fa88f9e5e61e1fd1283b914b50.zip
vim_moderc: Add [!] to :mkv[imrc].
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 6f219dc..575d697 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -73,7 +73,7 @@
# {file} not supported
# * Mappings: :map - display custom mappings
# :map {lhs} {rhs} - add mapping
-# * Save mappings: :mkv[imrc] - like in Vim, but [file] not supported
+# * Save mappings: :mkv[imrc][!] - like in Vim, but [file] not supported
# * Substitute: :s/// - i and g are supported as flags, only /// can be
# used as separator, uses Perl regex instead of
# Vim regex
@@ -1704,10 +1704,12 @@ sub ex_source {
}
sub ex_mkvimrc {
- # :mkv[imrc], [file] not supported
+ my ($arg_str) = @_;
+
+ # :mkv[imrc][!], [file] not supported
my $vim_moderc = Irssi::get_irssi_dir(). '/vim_moderc';
- if (-f $vim_moderc) {
+ if (-f $vim_moderc and $arg_str !~ /^mkv(?:imrc)?!$/) {
return _warn_ex('mkvimrc', "$vim_moderc already exists");
}