From da1f8fac4198a8fa88f9e5e61e1fd1283b914b50 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sat, 9 Oct 2010 01:29:08 +0200 Subject: vim_moderc: Add [!] to :mkv[imrc]. --- vim-mode/vim_mode.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'vim-mode') 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"); } -- cgit v1.2.3