Re: Could not load library msvcrt-ruby240.dll
On Do, 22 Feb 2018, Frantz Baustier wrote: > >> Ruby is install in C:\Ruby24 and the bin folder containing the > >> msvcrt-ruby240.dll is in %PATH%. > >> > >> I also tried to put in my vimrc file set > >> rubydll="C:\Ruby24\bin\msvcrt-ruby240.dll" but I got the following error : > > > > did you actually use :set rubydll="..." > > > > That does not work, since the `"` is the command character in vim. > > You’re right! But I tried with ‘ and IT doen’t work, sale error message Do not use quotes at all when using :set :set has its own quoting rules, you need to escape whitespace, bars, commas and backslashes. So you would have to use something like this: :set rubydll=C:\\Ruby24\\bin\\msvcrt-ruby240.dll It is usually easier to avoid all those escaping issues by using the :let form (:h :let-option): :let ='C:\Ruby24\bin\msvcrt-ruby240.dll' However make sure to use single quotation marks, as otherwise backslashes have to be doubled and might mean something different than intended (see :h expr-quote) BTW: Have you tried the answer from Ken (quoting from https://github.com/vim/vim-win32-installer/issues/47#issuecomment-366912233) , | Could you try adding C:\Ruby24\bin and also | C:\Ruby24\bin\ruby_builtin_dlls to the PATH environment? (If you use | 64-bit Vim, replace Ruby24 with Ruby24-x64.) ` Best, Christian -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: CTRL-[ == ALT == ESC to Vim? (or how to make them different)
Em quarta-feira, 21 de fevereiro de 2018 19:07:14 UTC-3, ZyX escreveu: > 2018-02-21 14:51 GMT+03:00 Renato Fabbri: > > That is what I get when typing with > > in insert mode. > > > > > > ((( > > > > " C-V C-[ > > " C-V A-x > > x > > > > " C-V > > echo " " == " " == " " > > echo ' ' == ' ' == ' ' > > ))) > > where this strange symbol appears as ^[ here, > > and x seems to be any key. > > > > In summary, C-[ and ESC equivalent, as somewhat > > expected, and Alt is prepends an ESC to any key. > > So, for example, if I make an insert-mode mapping > > > > inoremap A-Y :echo 'a banana' > > > > it will make the insert mode wait for a next letter after ESC (or C-[), > > which I bypass with a command such as: > > inoremap [ :up > > BTW. A-Y does not work here to write the imap, > > I have to enter it by typing C-V A-Y. > > > > BTW2. I hope these unusual chars don't mess your > > emails as it is messing here (not writing it in Vim though..). > > > > Is there a way to make ALT and ESC distinct? > > (ok about ESC == CTRL-[). > > You did not state what are you using exactly, this is essential to > answer a question. If you are using Vim in a terminal emulator then > you may need to ask *in terminal emulator’s mailing list* first > because Vim has no choice, but to swallow whatever terminal emulator > throws at it. Ability to get help here in this case would depend on > whether there are enough advanced users of your terminal emulator > reading vim_use. right. I am using a gnome-terminal (v3.18.3) on an up-to-date Ubuntu 16.04. I am usually inside byobu/tmux, but the issues remain the same, inside or outside byobu, so it seem really to be somethig to tackle in gnome-terminal (which AFAIR, is essentially a very tweaked (or layer over) x-term). > > Note that normally terminal emulators have a setting allowing to use > either `` or the eighth bit for `is even possible to configure from Vim by making it output special > escape codes recognized by terminal emulator. Other configuration > variants are more rare. Note that eighth bit variant is not friendly > to unicode. Valuable notes, thanks. I would like to configure it from Vim, if any idea or info comes to mind, please drop a line here. I'll do the same. > > > > > Best, > > rf > > > > -- > > Renato Fabbri > > GNU/Linux User #479299 > > labmacambira.sourceforge.net > > > > -- > > -- > > You received this message from the "vim_use" maillist. > > Do not top-post! Type your reply below the text you are replying to. > > For more information, visit http://www.vim.org/maillist.php > > > > --- > > You received this message because you are subscribed to the Google Groups > > "vim_use" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to vim_use+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re : Re: Could not load library msvcrt-ruby240.dll
Le 22 février 2018 à 09:33, Christian Brabandta écrit : On Do, 22 Feb 2018, Frantz Baustier wrote: Ruby is install in C:\Ruby24 and the bin folder containing the msvcrt-ruby240.dll is in %PATH%. I also tried to put in my vimrc file set rubydll="C:\Ruby24\bin\msvcrt-ruby240.dll" but I got the following error : did you actually use :set rubydll="..." That does not work, since the `"` is the command character in vim. You’re right! But I tried with ‘ and IT doen’t work, sale error message Do not use quotes at all when using :set :set has its own quoting rules, you need to escape whitespace, bars, commas and backslashes. So you would have to use something like this: :set rubydll=C:\\Ruby24\\bin\\msvcrt-ruby240.dll It is usually easier to avoid all those escaping issues by using the :let form (:h :let-option): :let ='C:\Ruby24\bin\msvcrt-ruby240.dll' However make sure to use single quotation marks, as otherwise backslashes have to be doubled and might mean something different than intended (see :h expr-quote) BTW: Have you tried the answer from Ken (quoting from https://github.com/vim/vim-win32-installer/issues/47#issuecomment-366912233) , | Could you try adding C:\Ruby24\bin and also | C:\Ruby24\bin\ruby_builtin_dlls to the PATH environment? (If you use | 64-bit Vim, replace Ruby24 with Ruby24-x64.) ` I have addedd C:\Ruby24\bin\ruby_builtin_dlls to the PATH and now it's work! Thanks for your help. Best, Christian -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: +eval feature missing in the MS32 binary
Aonton Shepelev wrote: > Is the '+eval' feature intentionally turned off for the MS32 > "GUI executable" of vim: > > ftp://ftp.vim.org/pub/vim/pc/gvim80-586.zip I just tried and that executable does have +eval. -- LAUNCELOT: Isn't there a St. Arrggghhh's in Cornwall? ARTHUR:No, that's Saint Ives. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
making custom key names for mappings
leader and localleader are the standard, so one might have conflicts between scripts because all of them use leader and localleader. how would you define, say , which you set to the leader by default, but can be changed to any key sequence (including c-v derived). == ideally, I would have a command mkKeyName with which to define such as :mkKeyName -default=leader coolleader and might set it to anything such as se mapcoolleader=^[ se mapcoolleader= se mapcoolleader! se mapcoolleader!= (this implies that one would also able to use :setlocal mapcoolleader ?? and use it in your mappings as in nnoremap B :call MyCoolFunction() thanks again, -- Renato Fabbri GNU/Linux User #479299 labmacambira.sourceforge.net -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: vimdiff - how to jump to next difference in long line - shortcut ]c does not work
On Wed, Feb 21, 2018 at 10:53 PM, Igor Forcawrote: > @Arun, thanks a lot for this code. I have performed two tests: > > TEST 1: LINES WITH NO DIFFERENCE BETWEEN TWO LINES WITH DIFFERENCES > > File1: > aaa aaa > aaa bbb > aaa aaa > aaa bbb > > File2: > aaa aaa > aaa ccc > aaa aaa > aaa ccc > > Lines 2 and 4 are different. There are lines without difference between > two different lines, like line 3. In this case ]c works perfectly it jumps > between diff changes. Excellent. > > > TEST 2: LINES WITH DIFFERENCES ARE ONE AFTER ANOTHER > > File1 - the same as in test 1. > File 2: > aaa aaa > aaa ccc > aaa ccc > aaa ccc > > Now lines 2, 3 and 4 are different. Cursor on first line first column and > pressing ]c jumps correctly to second line at first letter of c. Now I see > this difference is acceptable and I would like to jump to next difference. > Executing ]c I expect to get to the next (third) row and search for > difference. Like executing j0 (down and at first character in line) and > then executing ]c again. > That is the native behavior of ]c, it skips over current diff context. Working around in the script will be messy, will look into it when I can. Regards, -Arun > > I would like to have ]c working just like search does. For example > searching for aaa, executing /aaa then n (for next). Every time I press n > it gets to the next search string. Like that I would like to have ]c to > "search" next difference. Difference should not be the block but line. > > P.S. I am sorry I am not familiar with vim scripting. I would do the > change myself if I know how to program in vim-script. > > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: vim8.0 bug: syntax highlight breaks for "big" text file
I'm having the same issue with large python files with the exact same workaround: > 1. open file > 2. page down, OK > 3. repeat 2 till the end of file, OK > 4. go to first line, OK > 5. go to last line, OK I'm using vim 8 installed via homebrew on a mac. VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 13 2018 12:01:25) macOS version Included patches: 1-1500 Compiled by Homebrew Huge version without GUI. Features included (+) or not (-): +acl +channel +cryptv+emacs_tags -footer+lambda+mksession -mouse_sysmouse +path_extra+reltime +syntax+textobjects +viminfo -xpm +arabic+cindent +cscope+eval +fork()+langmap +modify_fname +mouse_urxvt +perl +rightleft +tag_binary+timers +vreplace -xsmp +autocmd -clientserver +cursorbind+ex_extra -gettext +libcall +mouse +mouse_xterm +persistent_undo +ruby +tag_old_static+title +wildignore-xterm_clipboard -autoservername+clipboard +cursorshape +extra_search -hangul_input +linebreak -mouseshape+multi_byte +postscript+scrollbind-tag_any_white -toolbar +wildmenu -xterm_save -balloon_eval +cmdline_compl +dialog_con+farsi +iconv +lispindent+mouse_dec +multi_lang +printer +signs -tcl +user_commands +windows +balloon_eval_term +cmdline_hist +diff +file_in_path +insert_expand +listcmds -mouse_gpm -mzscheme +profile +smartindent +termguicolors +vertsplit +writebackup -browse+cmdline_info +digraphs +find_in_path +job +localmap -mouse_jsbterm +netbeans_intg +python+startuptime +terminal +virtualedit -X11 ++builtin_terms+comments -dnd +float +jumplist -lua +mouse_netterm +num64 -python3 +statusline+terminfo +visual -xfontset +byte_offset +conceal -ebcdic+folding +keymap+menu +mouse_sgr +packages +quickfix -sun_workshop +termresponse +visualextra -xim system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/local/share/vim" Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: clang -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib -L/usr/local/lib -o vim-lncurses -liconv -framework AppKit -mmacosx-version-min=10.12 -fstack-protector-strong -L/usr/local/lib -L/usr/local/Cellar/perl/5.26.1/lib/perl5/5.26.1/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -F/usr/local/opt/python/Frameworks -framework Python -lruby.2.5.0 -lobjc I don't experience this issue using vim 7.4 installed side-by-side (vim@7.4) on the same machine, using the same .vimrc. Have you discovered any workaround for this issue? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: making custom key names for mappings
2018-02-22 18:58 GMT+03:00 Renato Fabbri: > leader and localleader are the standard, so one might > have conflicts between scripts because > all of them use leader and localleader. > > how would you define, say > , which you set to the > leader by default, > but can be changed to any key > sequence (including c-v derived). > > == > ideally, I would have a command mkKeyName with which to define > such as > > :mkKeyName -default=leader coolleader > > and might set it to anything such as > se mapcoolleader=^[ > se mapcoolleader= > se mapcoolleader! > se mapcoolleader!= > > (this implies that one would also able to use > :setlocal mapcoolleader ?? > > and use it in your mappings > as in > nnoremap B :call MyCoolFunction() This is not needed, there is `:execute` as something requiring changes to plugin code. E.g. my plugins (on my frawor framework) allow defining plugin-specific leader. To override `mapleader` for plugins which are not nice enough to allow defining plugin-specific leader there is SourcePre event. I personally find mapleader and maplocalleader as quite *incomplete* thing. For plugins much better idea would be key-value store: e.g. in place of nnoremap (FooPluginDoBar) :call foo#bar() nnoremap (FooPluginDoZab) :call foo#zab() nmap fb (FooPluginDoBar) nmap fz (FooPluginDoZab) (last two possibly surrounded by `if !hasmapto(…)|endif`) one would write just mapdefineprefix FooPlugin f nnoremap <:FooPlugin:DoBar(b)> :call foo#bar() nnoremap <:FooPlugin:DoZab(z)> :call foo#zab() and Vim will handle actually substituting values like this: each `<:prefix:mapname(default)>` expands into a concat of two strings: 1. The rhs of the first `:mapdefineprefix` command with lhs equal to `prefix`. 2. The rhs of the first `:mapdefine` command or the `default` value if no `:mapdefine` commands with lhs equal to `prefix:mapname` were issued. Inside `default` `<>` are good as long as they are balanced, various special characters like `)` may be entered via something like ``. In both cases using bang clears the prefix, so next non-banged command will define it (normally it is ignored). E.g. in this case if user wants mappings of foo plugin start with `,o` and not `f` all he needs would be putting mapdefineprefix FooPlugin ,o into the vimrc (requirement: before sourcing actual plugin). If additionally he thinks that `DoZab` command is easier to run with `,oo` he would need mapdefine FooPlugin:DoZab o (requirement is the same). Currently plugins may do this on top of `:execute`, but nobody bothers. I normally want this functionality to e.g. make NERDCommenter mappings all start with `,c` (no, redefining `` for all plugins does not sound like a good idea; `SourcePre` is useful, but still feels like a hack) or “undefine” (i.e. prefix with something you would never type, e.g. `XXXIWouldNeverTypeThisXXX`) mappings for plugins I install for functionality other then mappings (not everybody is nice enough to have g:NERDCreateDefaultMappings setting). > > thanks again, > > > -- > Renato Fabbri > GNU/Linux User #479299 > labmacambira.sourceforge.net > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: making custom key names for mappings
Well, from your comments, i put a: let g:aall = mapleader " let mapleader = '' if exists("g:aa_leader") let mapleader = g:aa_leader el let mapleader = 'anything' en before the mappings, and a: let mapleader = g:aall after them and it is all ok. (only these mappings use the temporarily defined leader key.) I did not understand how SourcePre would be used. Something like: au SourcePre mymappings.vim let [g:fooleader, mapleader] = ['something', mapleader] in combination with a somewhat SourcePost event to set mapleader to fooleader? Anyway, I understood that it is not needed to define extra key names, but is it possible within Vim standard capabilities? Em quinta-feira, 22 de fevereiro de 2018 18:22:51 UTC-3, ZyX escreveu: > 2018-02-22 18:58 GMT+03:00 Renato Fabbri: > > leader and localleader are the standard, so one might > > have conflicts between scripts because > > all of them use leader and localleader. > > > > how would you define, say > > , which you set to the > > leader by default, > > but can be changed to any key > > sequence (including c-v derived). > > > > == > > ideally, I would have a command mkKeyName with which to define > > such as > > > > :mkKeyName -default=leader coolleader > > > > and might set it to anything such as > > se mapcoolleader=^[ > > se mapcoolleader= > > se mapcoolleader! > > se mapcoolleader!= > > > > (this implies that one would also able to use > > :setlocal mapcoolleader ?? > > > > and use it in your mappings > > as in > > nnoremap B :call MyCoolFunction() > > This is not needed, there is `:execute` as something requiring changes > to plugin code. E.g. my plugins (on my frawor framework) allow > defining plugin-specific leader. > > To override `mapleader` for plugins which are not nice enough to allow > defining plugin-specific leader there is SourcePre event. > > I personally find mapleader and maplocalleader as quite *incomplete* > thing. For plugins much better idea would be key-value store: e.g. in > place of > > nnoremap (FooPluginDoBar) :call foo#bar() > nnoremap (FooPluginDoZab) :call foo#zab() > > nmap fb (FooPluginDoBar) > nmap fz (FooPluginDoZab) > > (last two possibly surrounded by `if !hasmapto(…)|endif`) one would write just > > mapdefineprefix FooPlugin f > nnoremap <:FooPlugin:DoBar(b)> :call foo#bar() > nnoremap <:FooPlugin:DoZab(z)> :call foo#zab() > > and Vim will handle actually substituting values like this: each > `<:prefix:mapname(default)>` expands into a concat of two strings: > > 1. The rhs of the first `:mapdefineprefix` command with lhs equal to `prefix`. > 2. The rhs of the first `:mapdefine` command or the `default` value if > no `:mapdefine` commands with lhs equal to `prefix:mapname` were > issued. Inside `default` `<>` are good as long as they are balanced, > various special characters like `)` may be entered via something like > ``. > > In both cases using bang clears the prefix, so next non-banged command > will define it (normally it is ignored). > > E.g. in this case if user wants mappings of foo plugin start with `,o` > and not `f` all he needs would be putting > > mapdefineprefix FooPlugin ,o > > into the vimrc (requirement: before sourcing actual plugin). If > additionally he thinks that `DoZab` command is easier to run with > `,oo` he would need > > mapdefine FooPlugin:DoZab o > > (requirement is the same). > > Currently plugins may do this on top of `:execute`, but nobody > bothers. I normally want this functionality to e.g. make NERDCommenter > mappings all start with `,c` (no, redefining `` for all > plugins does not sound like a good idea; `SourcePre` is useful, but > still feels like a hack) or “undefine” (i.e. prefix with something you > would never type, e.g. `XXXIWouldNeverTypeThisXXX`) mappings for > plugins I install for functionality other then mappings (not everybody > is nice enough to have g:NERDCreateDefaultMappings setting). > > > > > thanks again, > > > > > > -- > > Renato Fabbri > > GNU/Linux User #479299 > > labmacambira.sourceforge.net > > > > -- > > -- > > You received this message from the "vim_use" maillist. > > Do not top-post! Type your reply below the text you are replying to. > > For more information, visit http://www.vim.org/maillist.php > > > > --- > > You received this message because you are subscribed to the Google Groups > > "vim_use" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to vim_use+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to
after directory of a plugin in pack/
I have plugins in pack/ttm/opt// they have directories such as plugin/ syntax/ ftdetect/ and all always works as expected. Only the after/ directory has a "problem": i have files e.g. in: pack/ttm/opt//after/plugin/ Such afile.vim is not loaded unless i execute: :runtime! plugin/**/*.vim Is this the expected behavior? In ":h after" is stated that runtime files are searched for in the after directories of the system-wide Vim directory and on the home directory. But in :h packages it also states that after directory of a pack plugin is added to Although in :h packages it is stated that 'The "after" directory is most likely not useful in a package. It's not disallowed though.', it seems to me that an after directory is very useful in package to make final commands with everything loaded, and be sure that some variables and settings are as expected, to host user-defined configurations that apply only to the plugin, and whatnot... Any clues? tx again -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: vimdiff - how to jump to next difference in long line - shortcut ]c does not work
@Arun, thanks a million for this script. ]x and [x work exactly what I want. I also tested the ]c and it behaves the sames as ]x and [c behaves the same as [x on my previous post samples. I actually only need ]x and [x behavior, but just out of curiosity what suppose to be the difference between "x" and "c" commands? P.S. Just two small typos in your script. Comments in lines 47 and 49 are the same as lines 52 and 54. Probably copy/paste problem. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: vimdiff - how to jump to next difference in long line - shortcut ]c does not work
I am not sure how my plugin, https://github.com/rickhowe/diffchar.vim, can help you, but it provides ]b/[b/]e/[e keymaps to jump cursor around the exact differences. Please try it. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: making custom key names for mappings
2018-02-23 1:43 GMT+03:00 Renato Fabbri: > Well, from your comments, i put a: > > let g:aall = mapleader > " let mapleader = '' > if exists("g:aa_leader") > let mapleader = g:aa_leader > el > let mapleader = 'anything' > en > > > before the mappings, and a: > > let mapleader = g:aall > > after them and it is all ok. > (only these mappings use the > temporarily defined leader key.) > > I did not understand how SourcePre > would be used. > Something like: > au SourcePre mymappings.vim let [g:fooleader, mapleader] = ['something', > mapleader] > > in combination with a somewhat SourcePost event to > set mapleader to fooleader? No, you set mapleader for *all* scripts, either to default or to something else. There is no SourcePost for some reason; an alternative is messing with SourceCmd, but this is harder to do right in general, but easier to use for specific use cases. > > Anyway, I understood that it is not needed to define > extra key names, but is it possible within Vim standard > capabilities? What is possible? All XXX in `` are defined at compile time only, you can’t evaluate expression inside XXX or something like this. > > > Em quinta-feira, 22 de fevereiro de 2018 18:22:51 UTC-3, ZyX escreveu: >> 2018-02-22 18:58 GMT+03:00 Renato Fabbri: >> > leader and localleader are the standard, so one might >> > have conflicts between scripts because >> > all of them use leader and localleader. >> > >> > how would you define, say >> > , which you set to the >> > leader by default, >> > but can be changed to any key >> > sequence (including c-v derived). >> > >> > == >> > ideally, I would have a command mkKeyName with which to define >> > such as >> > >> > :mkKeyName -default=leader coolleader >> > >> > and might set it to anything such as >> > se mapcoolleader=^[ >> > se mapcoolleader= >> > se mapcoolleader! >> > se mapcoolleader!= >> > >> > (this implies that one would also able to use >> > :setlocal mapcoolleader ?? >> > >> > and use it in your mappings >> > as in >> > nnoremap B :call MyCoolFunction() >> >> This is not needed, there is `:execute` as something requiring changes >> to plugin code. E.g. my plugins (on my frawor framework) allow >> defining plugin-specific leader. >> >> To override `mapleader` for plugins which are not nice enough to allow >> defining plugin-specific leader there is SourcePre event. >> >> I personally find mapleader and maplocalleader as quite *incomplete* >> thing. For plugins much better idea would be key-value store: e.g. in >> place of >> >> nnoremap (FooPluginDoBar) :call foo#bar() >> nnoremap (FooPluginDoZab) :call foo#zab() >> >> nmap fb (FooPluginDoBar) >> nmap fz (FooPluginDoZab) >> >> (last two possibly surrounded by `if !hasmapto(…)|endif`) one would write >> just >> >> mapdefineprefix FooPlugin f >> nnoremap <:FooPlugin:DoBar(b)> :call foo#bar() >> nnoremap <:FooPlugin:DoZab(z)> :call foo#zab() >> >> and Vim will handle actually substituting values like this: each >> `<:prefix:mapname(default)>` expands into a concat of two strings: >> >> 1. The rhs of the first `:mapdefineprefix` command with lhs equal to >> `prefix`. >> 2. The rhs of the first `:mapdefine` command or the `default` value if >> no `:mapdefine` commands with lhs equal to `prefix:mapname` were >> issued. Inside `default` `<>` are good as long as they are balanced, >> various special characters like `)` may be entered via something like >> ``. >> >> In both cases using bang clears the prefix, so next non-banged command >> will define it (normally it is ignored). >> >> E.g. in this case if user wants mappings of foo plugin start with `,o` >> and not `f` all he needs would be putting >> >> mapdefineprefix FooPlugin ,o >> >> into the vimrc (requirement: before sourcing actual plugin). If >> additionally he thinks that `DoZab` command is easier to run with >> `,oo` he would need >> >> mapdefine FooPlugin:DoZab o >> >> (requirement is the same). >> >> Currently plugins may do this on top of `:execute`, but nobody >> bothers. I normally want this functionality to e.g. make NERDCommenter >> mappings all start with `,c` (no, redefining `` for all >> plugins does not sound like a good idea; `SourcePre` is useful, but >> still feels like a hack) or “undefine” (i.e. prefix with something you >> would never type, e.g. `XXXIWouldNeverTypeThisXXX`) mappings for >> plugins I install for functionality other then mappings (not everybody >> is nice enough to have g:NERDCreateDefaultMappings setting). >> >> > >> > thanks again, >> > >> > >> > -- >> > Renato Fabbri >> > GNU/Linux User #479299 >> > labmacambira.sourceforge.net >> > >> > -- >> > -- >> > You received this message from the "vim_use" maillist. >> > Do not top-post! Type your reply below the text you are replying to. >> > For more information, visit http://www.vim.org/maillist.php >> > >> > --- >> > You received this message because you are subscribed to the Google Groups >> > "vim_use"
Re: vimdiff - how to jump to next difference in long line - shortcut ]c does not work
On Thu, Feb 22, 2018 at 9:26 AM, Arunwrote: > On Wed, Feb 21, 2018 at 10:53 PM, Igor Forca wrote: > >> @Arun, thanks a lot for this code. I have performed two tests: >> >> TEST 1: LINES WITH NO DIFFERENCE BETWEEN TWO LINES WITH DIFFERENCES >> >> File1: >> aaa aaa >> aaa bbb >> aaa aaa >> aaa bbb >> >> File2: >> aaa aaa >> aaa ccc >> aaa aaa >> aaa ccc >> >> Lines 2 and 4 are different. There are lines without difference between >> two different lines, like line 3. In this case ]c works perfectly it jumps >> between diff changes. Excellent. >> >> >> TEST 2: LINES WITH DIFFERENCES ARE ONE AFTER ANOTHER >> >> File1 - the same as in test 1. >> File 2: >> aaa aaa >> aaa ccc >> aaa ccc >> aaa ccc >> >> Now lines 2, 3 and 4 are different. Cursor on first line first column and >> pressing ]c jumps correctly to second line at first letter of c. Now I see >> this difference is acceptable and I would like to jump to next difference. >> Executing ]c I expect to get to the next (third) row and search for >> difference. Like executing j0 (down and at first character in line) and >> then executing ]c again. >> > > That is the native behavior of ]c, it skips over current diff context. > Working around in the script will be messy, will look into it when I can. > > Regards, > -Arun > > >> >> I would like to have ]c working just like search does. For example >> searching for aaa, executing /aaa then n (for next). Every time I press n >> it gets to the next search string. Like that I would like to have ]c to >> "search" next difference. Difference should not be the block but line. >> >> P.S. I am sorry I am not familiar with vim scripting. I would do the >> change myself if I know how to program in vim-script. >> >> >> Give the attached script a shot. Try the "]x" mapping as well, it sounds like what you are after. Regards, -Arun -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. diff_search.vim Description: Binary data