Re: Simple Vim questions -- Backspace + Escape in maps

2023-01-03 Thread 'Jürgen Krämer' via vim_use
Hi, I don't see the original message so I will answer to Enan's message. Enan Ajmain schrieb am 01.01.2023 um 14:56: On Sat, 31 Dec 2022 09:11:04 -0800 (PST) "bertran...@gmail.com"wrote: 1. Backspace in insert mode, over some characters, gives a special character instead of erasing. I

Re: syntax for "map key test?'cmd1':'cmd2'|:cmd3|:cmd4"

2022-04-27 Thread 'Jürgen Krämer' via vim_use
Hi, Christian Brabandt schrieb am 27.04.2022 um 10:02: > > On Di, 26 Apr 2022, dado wrote: > >> I have the following (pseudo code) mapping working: >> nmap key some-expr ? >> \ 'cmd1:cmd3:cmd4' : >> \ 'cmd2:cmd3:cmd4' >> >> As you can see the conditional selects between cmd1 and cmd2,

Re: sumup some noremap exe command

2022-04-04 Thread 'Jürgen Krämer' via vim_use
Hi, Ni Va schrieb am 02.04.2022 um 07:19: > Is there a way to reduce, simplify and sumpup *those kind of* noremap > *command?* > > Avoiding *:exe *(due to concatenate luafile + path) > nnoremap lua  :*exe* 'luafile ' .. expand('%:p') > > Avoiding *double :exe ... * command ? > nnoremap lua 

Re: opening utf-16 fileencoded ucs-2 Little Endian

2021-10-04 Thread 'Jürgen Krämer' via vim_use
Hi, Christian Brabandt schrieb am 04.10.2021 um 12:44: > > On Mo, 04 Okt 2021, Ni Va wrote: > >> No error message but I don't happen to read the file. > > And you did use ':e! ++enc=utf16le' for the already loaded file? Because > with this exact same command, I can reload the loaded file

Re: Specify a range for a python command alias

2021-09-22 Thread 'Jürgen Krämer' via vim_use
Hi, Haslett, Garvin schrieb am 22.09.2021 um 13:04: > Following the web page listed below I've created the following command alias > in my .vimrc to conveniently prettify .json files: > command! Pj %!python -m json.tool > > It works great but, ideally, I'd like to specify ranges. I tried the >

Re: Unable to turn off spelling for words followed by punctuation characters

2021-09-15 Thread 'Jürgen Krämer' via vim_use
Hi, Steve Dondley schrieb am 07.09.2021 um 13:47: > I'm have a tough time turning off spell checking for words that immediately > follow a punctuation character. > > For example, I don't want any of the words in this path to be spellchecked: > > /kjkj/kasjdf/kjdsf > > So I did: > > syn match

Re: CTRL+V I CTRL+Y - duplicating text from current line.

2021-07-05 Thread 'Jürgen Krämer' via vim_use
Hi, Chris Jones schrieb am 03.07.2021 um 21:50: > Something that's been bugging me for some time. > > I am working on an anthology of French literature and I need to xhtml > this renowned piece from the late 18th century: > > | 000 ... > | 001 En tous lieux le cul nous appelle,

Re: Some basic Vim commands

2021-04-19 Thread 'Jürgen Krämer' via vim_use
Hi, Julius Hamilton schrieb am 19.04.2021 um 15:33: > Thanks very much. I plan on reading through this soon, when I have the time. > > I was also curious, I created a split screen with CTRL-W s. But in the lower > screen, if I'd like a terminal running there, when I type :sh, the entire Vim >

Re: vim9script: dump file content to list of list question !

2021-01-17 Thread 'Jürgen Krämer' via vim_use
Hi, Ni Va schrieb am 15.01.2021 um 14:38: > > I got this kind of classical logfile : > > 2021/01/14 07:42:22.588 InformationFoo dbg  > 2021/01/14 07:42:22.588 InformationBar dbg  > 2021/01/14 07:42:22.588 Information    Foobar dbg  > 2021/01/14 07:42:22.588 Information    Barbar dbg  > .. > .

Re: E77: Too many files

2020-12-18 Thread 'Jürgen Krämer' via vim_use
Hi, Manfred Lotz schrieb am 18.12.2020 um 10:16: > I have a simple scratch buffer functionity in scratch.vim like follows > > if exists('g:loaded_scratch') > finish > endif > let g:loaded_scratch = 1 > > let g:scratchbuf_no = 1 > > function! ScratchEdit(cmd) > exe a:cmd '[Scratch' .

Re: Retrieving serverlist list out of popup

2020-10-21 Thread 'Jürgen Krämer' via vim_use
Hi, Ni Va schrieb am 20.10.2020 um 15:29: > > I am using GVim build following infos : > > * VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Oct 20 2020 14:40:45) > * MS-Windows 32-bit GUI version with OLE support > * Included patches: 1-*1870* > > > I would like to retrieve a script (vim9)

Re: Broken Q key... how can I leave vim without saving?

2020-09-07 Thread 'Jürgen Krämer' via vim_use
Hi, Jürgen Krämer schrieb am 02.09.2020 um 10:57: > > tu...@posteo.de schrieb am 02.09.2020 um 10:40: >> On 09/02 05:28, Paolo Bolzoni wrote: >>> >>> It is not a joke, my laptop keyboard is broken and seldom the keys Q, >>> 4, Ins, and few others stop w

Re: Broken Q key... how can I leave vim without saving?

2020-09-02 Thread 'Jürgen Krämer' via vim_use
Hi tu...@posteo.de schrieb am 02.09.2020 um 10:40: > On 09/02 05:28, Paolo Bolzoni wrote: >> >> It is not a joke, my laptop keyboard is broken and seldom the keys Q, >> 4, Ins, and few others stop working. >> Is there a way to leave vim without saving without using the Q key? > > From insert

Re: v:count in mapping gets E492: Not an editor command: count

2020-07-20 Thread 'Jürgen Krämer' via vim_use
Hi, Graham Lawrence schrieb am 19.07.2020 um 22:07: > :h v:count includes the following example > | > map _x :echo "the count is ".v:count > | > > which works as expected, but using > | > map :let @n=v:count1... > | > did you really leave out the left-hand-side of the mapping in your .vimrc or is

Re: persistent highlight between marks ?

2020-06-14 Thread 'Jürgen Krämer' via vim_use
Hi, M Kelly schrieb am 13.06.2020 um 14:21: > > Anyone know of a way to set a start mark and then an end mark and then > highlight all text between them ? > So that is stays highlighted, even if I move the cursor away or scroll > etc.  > Sort of like a visual mode selection that remains after

Re: netrw echoes message even if disable

2019-10-14 Thread 'Jürgen Krämer' via vim_use
Hi, Ni Va schrieb am 13.10.2019 um 21:38: > > Even with loaded plugin status to disable netrw, it echoes 'is a directory'. > > This in my _vimrc as it is advised, and it echoes 'is a directory'...  ??? > let g:loaded_netrw       = 1 > let g:loaded_netrwPlugin = 1 > > How can we disable plugin

Re: Vim on MacOS Incorrectly Indenting

2019-05-20 Thread 'Jürgen Krämer' via vim_use
Hello Adrian, Adrian Keister schrieb am 20.05.2019 um 18:22: > On Monday, May 20, 2019 at 2:15:08 AM UTC-5, jott...@googlemail.com wrote: >> Hi, >> >> Adrian Keister schrieb am 17.05.2019 um 19:19: >>> I'm having difficulty with vim on Mac OS. It's indenting incorrectly. The >>> attached txt

Re: Vim on MacOS Incorrectly Indenting

2019-05-20 Thread 'Jürgen Krämer' via vim_use
Hi, Adrian Keister schrieb am 17.05.2019 um 19:19: > I'm having difficulty with vim on Mac OS. It's indenting incorrectly. The > attached txt file is the test file, and the two screenshots show how > different they look on Mac versus Windows. The Windows gVim is the look I > want. I've tried

Re: Version Control

2019-05-17 Thread 'Jürgen Krämer' via vim_use
Hi, Vedanth Srinivasan schrieb am 16.05.2019 um 02:30: > Please tell me how to get Version Control/ Local History on a file in vim. I > would like to take a look at the changes made to a file step by step.    if you only want to visualize the changes made inside Vim (not within a version control

Re: how to display current syntax and highlight items

2019-02-13 Thread 'Jürgen Krämer' via vim_use
[accidentally sent privately, so sending it again] Hi, Marvin Renich schrieb am 12.02.2019 um 17:33: > I have looked through index.txt (especially g commands), syntax.txt, and > usr_06.txt, but I could not find any reference to displaying the name of > the current syntax item and/or highlight

Re: :p & :P bugs?

2018-12-06 Thread 'Jürgen Krämer' via vim_use
Hi, Tim Chase schrieb am 06.12.2018 um 14:19: > Brought to my attention by this thread: > > https://www.reddit.com/r/vim/comments/a3e80i/is_vim_right_for_me/ > > It seems to me that :p should always only print the line, even if > 'number' is set. If you want to print the line with its

Re: Why does this mapping move my cursor?

2018-10-10 Thread 'Jürgen Krämer' via vim_use
Hi, Chris Lott schrieb am 10.10.2018 um 21:05: > > I have a mapping in my .vimrc : > > nnoremap md :write:silent !open -a 'Marked.app' '%:p' > > When I invoke the map, my cursor in Vim moves to the beginning of the > line. This doesn't happen if I run the commands manually. Why does the > cursor

Re: yank and put not vmapping in debian stretch

2018-07-24 Thread 'Jürgen Krämer' via vim_use
Hi, tom arnall schrieb am 24.07.2018 um 04:42: > > Here is (I hope) the presentation which you have requested. > > Here is output of 'version': > > :version > VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Sep 30 2017 18:21:38) > Included patches: 1-197, 322, 377-378, 550, 703, 706-707 >

Re: Syntax matching question(s)

2018-07-13 Thread 'Jürgen Krämer' via vim_use
Hi, Robert schrieb am 13.07.2018 um 15:29: > On Friday, July 13, 2018 at 3:05:03 AM UTC-4, Lifepillar wrote: >> On 13/07/2018 06:37, Robert wrote: >>> On Thursday, July 12, 2018 at 10:51:40 PM UTC-4, Robert wrote: I am creating a vim syntax file for GNU Rec as an exercise in creating a

Re: highlight items in red that are past due

2017-07-12 Thread 'Jürgen Krämer' via vim_use
Hi, Christian Brabandt schrieb am 12.07.2017 um 09:18: > > On Mo, 10 Jul 2017, Robert wrote: > >> I have a specific tag "due:-MM-DD" in my files. >> >> Is it possible for a function to compare all the matches it finds to >> today's date and if the "due:" is is past, to highlight it? > >

Re: Messages oddity

2017-07-09 Thread 'Jürgen Krämer' via vim_use
Hi, Phil Dobbin schrieb am 08.07.2017 um 13:24: > On 08/07/17 12:03, Bram Moolenaar wrote: >> >> Phil Dobbin wrote: >> >>> I was trying to debug something in Vim today & I needed to see the >>> fleeting error messages that flash by when Vim spots trouble. However >>> when I run :messages all I

Re: Regula expressions: How to find a string without some other string

2017-07-05 Thread 'Jürgen Krämer' via vim_use
Hi, Igor Forca schrieb am 05.07.2017 um 14:40: > I got excellent answer using NEGATIVE, from Jürgen on my private e-mail. > >> I would use negative look-ahead (":help /\@!"): >> /AAA\(000\)\@!\d\d\d\D/ >> >> This matches 3 "A"s, three digits, which must not be "000", and one >> non-digit. >>

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread 'Jürgen Krämer' via vim_use
Hi, sinbad schrieb am 08.12.2016 um 14:03: > On Thursday, December 8, 2016 at 2:51:51 PM UTC+5:30, jott...@googlemail.com > wrote: > >> inside double quotes the backslash has a special meaning. > > sounds like bad design choice to overload the meaning of an operator like > that. Anyway i got

Re: discrepancy in regular expression match using bufdo command

2016-12-08 Thread 'Jürgen Krämer' via vim_use
Hi, sinbad schrieb am 08.12.2016 um 08:57: > > I have a file contents as follows, i want to change the text from abc("def"); > to > foo(("def")); in multiple files. > > It works if i run the command, but the same thing fails if i run the same > command using bufdo; > > works->

Re: vim function argument

2016-07-14 Thread 'Jürgen Krämer' via vim_use
Hi, Yang Luo schrieb am 14.07.2016 um 12:06: > > I complete the function as follow, now I want to add radix option, but I > don't know how to get width. Can you help me complement it > > function InsertNumber(start, end,...) " > step,is_column_first_0_padding,radix(b,d,o,x) > let l:i

Re: vim function argument

2016-07-14 Thread 'Jürgen Krämer' via vim_use
Hi, Yang Luo schrieb am 14.07.2016 um 08:41: > > I write a function like this: > function InsertNumber(start, end, step) > > let i = a:start > > let curr_line = 0 > > while i <= a:end > if a:step <= 0 > echo "Error: step cannot <=0." > break > endif >

Re: pass count to nmap with call

2016-07-14 Thread 'Jürgen Krämer' via vim_use
Hi, Bee schrieb am 14.07.2016 um 08:28: > I tried to pass a count to but got a range error. > > nmap :call VMA():bn > > Can it be done? > > nmap :bn > > 4 works in my experience counts and mappings don't work together very well. A preceding count is always used for the first command in

Re: subscripts and superscripts

2016-06-02 Thread 'Jürgen Krämer' via vim_use
Hi, kamaraju kusumanchi schrieb am 02.06.2016 um 02:54: > On Tue, May 31, 2016 at 1:35 AM, 'Jürgen Krämer' via vim_use > <vim_use@googlegroups.com> wrote: >> >> Unicode contains subscript and superscript digits. With 'encoding' set >> to UTF-8 and an appropriate fon

Re: subscripts and superscripts

2016-05-30 Thread 'Jürgen Krämer' via vim_use
Hi, kamaraju kusumanchi schrieb am 31.05.2016 um 06:46: > For normal editing purposes, I use vim and it works great. But once in > a while, I want to use subscripts and superscripts. For example, while > writing chemical equations I would like to see O with a subscript 2 to > represent the

Re: Feature or bug? Funny behaviour of cw on whitespace.

2016-02-11 Thread 'Jürgen Krämer' via vim_use
Hi, 'Elmar Hinz' via vim_use schrieb am 11.02.2016 um 15:00: > On Thursday, February 11, 2016 at 2:41:42 PM UTC+1, Elmar Hinz wrote: > >> How do I get my personal settings out of the way, without falling into vi >> compatible? >> >> > > vim -u NONE -C > I think you meant vim -u NONE -N

Re: inclusive-linewise: Is the help topic wrong?

2016-02-09 Thread 'Jürgen Krämer' via vim_use
Hi, Elmar Hinz schrieb am 09.02.2016 um 17:19: > > I am observing an behaviour that doesn't seem consistent with the help. > > Given following text, with Cursor on A: > >Aaa > bbb > ccc > > Hitting 2d$ deletes the space before A. This seems to be the behaviour of > exclusive-linewise. >

Re: I have a dream, about pseudocoding support

2015-12-09 Thread 'Jürgen Krämer' via vim_use
Hi, Paul schrieb am 09.12.2015 um 07:41: > I have a dream, about pseudocoding support > -- > I'm using vim to write pseudocode. This example must be viewed in > fixed with font: > >For each machine type demanded, starting from the one with the >

Re: I have a dream, about pseudocoding support

2015-12-09 Thread 'Jürgen Krämer' via vim_use
Hi, Paul schrieb am 09.12.2015 um 15:38: > On Wednesday, December 9, 2015 at 3:28:02 AM UTC-5, jott...@googlemail.com > wrote: >> >> If you want the vertical lines to be present in your file check if the >> following settings suit your needs >> >> :set formatoptions+=tcql >> :set

Re: Visual blcok: Force insert ("I") to insert even in rows that have no characters

2015-09-16 Thread 'Jürgen Krämer' via vim_use
Hi, Paul schrieb am 16.09.2015 um 15:42: > When coding, I often press ctrl-V, highlight a column of text of a certain > height, then press "I" to insert (say) a comment delimiter or a line > continuation flag character. This doesn't quite work on short rows of text > that end before the

Re: Inserting genuine tab character.

2015-09-08 Thread 'Jürgen Krämer' via vim_use
Hi, John Culleton schrieb am 08.09.2015 um 14:53: > I am building an index for a customer. His > publisher insists on the use of a genuine tab > character and not just spaces emulating a tab. > > Can gvim insert a tab character? How? :set noexpandtab Regards, Jürgen -- Sometimes I think

Re: :1,9000bdCR is giving 'E16 invalid range' after update

2015-05-20 Thread Jürgen Krämer
Hi, Wael Nasreddine schrieb am 20.05.2015 um 10:42: I have this map in my vimrc: Wipe out all buffers nmap silent leaderwa :1,9000bdcr and it used to work fine on Vim 7.4.488[0] but since I've updated Vim to 7.4.712[1] it errors our with 'E16: Invalid range'. Is anyone else

Re: :1,9000bdCR is giving 'E16 invalid range' after update

2015-05-20 Thread Jürgen Krämer
Hi, Wael Nasreddine schrieb am 20.05.2015 um 21:30: Jürgen Krämer jottka...@googlemail.com writes: Wael Nasreddine schrieb am 20.05.2015 um 10:42: I have this map in my vimrc: Wipe out all buffers nmap silent leaderwa :1,9000bdcr and it used to work fine on Vim 7.4.488[0] but since

Re: VimL string index

2015-05-04 Thread Jürgen Krämer
Hi, Mark Volkmann schrieb am 04.05.2015 um 12:39: I don't see a builtin function to find the index of a substring within a string. Does that exist? For example, I want something like index('foobarbaz', 'bar') to return 3. It seems the index function works on lists, but not strings. the

Re: Gvim save session dialog

2015-04-21 Thread Jürgen Krämer
Hi, av schrieb am 21.04.2015 um 13:25: I would like to know what is the command in gvim to popup the save or load session dialog that is available from the gvim toolbar. take a look at the output of :menu ToolBar Somewhere in this output you will see something like 220 LoadSesn

Re: Is there a movement to the start of the enclosing fold?

2015-03-17 Thread Jürgen Krämer
Hi, Erik Christiansen schrieb am 17.03.2015 um 10:51: If I'm in a leaf fold, then ?{{{ will take me back to the start of the fold¹, to discover its title. That's sometimes very useful when I've landed more than a page within it via a search. But if there are several (even closed)

Re: How to cancel [count] prefix?

2015-03-04 Thread Jürgen Krämer
Hi, Alexey schrieb am 03.03.2015 um 14:39: i need this for my custom mappings, but i am also curious in this question on its own right: How do you cancel the count prefix in Vim? Say, i've typed '42' before a motion key, but then changed my mind and decided to use a different

Re: Strange reaction of gvim to : in a normal mode

2014-11-03 Thread Jürgen Krämer
Hi, Gevisz schrieb am 02.11.2014 um 19:44: On Sun, 2 Nov 2014 14:51:24 +0200 Gevisz gev...@gmail.com wrote: I use gvim from xfce4 and sometimes get into a strange situation when pressing : while being in a normal mode leads not to the command line mode but instead highlights the icon Copy

Re: shortcuts for long filenames

2014-10-23 Thread Jürgen Krämer
Hi, DwigtArmyOfChampions schrieb am 23.10.2014 um 14:58: Oftentimes I'm opening really long filenames in command mode, for example: :e /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module Is there a way to create aliases for this file? Or if not the whole file, how about

Re: shortcuts for long filenames

2014-10-23 Thread Jürgen Krämer
Hi, DwigtArmyOfChampions schrieb am 23.10.2014 um 16:24: Thanks! These are great! Second question: Is there an easy way to delete a word after pasting that text? Suppose I want to delete modules/. Is there a quick way to do that without deleting each character through backspace? just

Re: vim +n trigger

2014-10-08 Thread Jürgen Krämer
Hi, toothpik schrieb am 08.10.2014 um 13:56: On Wed, Oct 08, 2014 at 09:47:29PM +1100, Erik Christiansen wrote: On 08.10.14 12:13, Paul wrote: I often open a file at a particular line number, with vim file +n. Is there a variable I can examine with something like BufReadPost so that I can

Re: make substitution on a copy (kindof) of matching lines

2014-10-08 Thread Jürgen Krämer
Hi, BPJ schrieb am 08.10.2014 um 16:00: Den 2014-10-02 16:33, Tim Chase skrev: On 2014-10-02 16:17, BPJ wrote: The other day I felt the need for a command/function which did a :substitute on a *copy* of each line matching its search pattern and inserted that copy below the original,

Re: Parse an error log and go to the line indicated as being the error?

2014-09-18 Thread Jürgen Krämer
Hi, David Woodfall schrieb am 18.09.2014 um 10:25: Hi, I have a function that calls my make application and if compilation fails it brings up a new window at the top of the term with the log open in it. All works well but what I'd like to do is grab the line from the error message and go to

Re: Run External Command with specific buffer

2014-07-07 Thread Jürgen Krämer
Hi, Mohammod nazmuSakiB wrote: Lets say I split all my buffer with sba command Then I navigate to a window , lets say 2nd buffer. Now I want to run an external command with another buffer as argument For example :!g++ Here I want to pass first buffer name as argument how to do so? you

Re: automatically editing many .tec files

2014-04-22 Thread Jürgen Krämer
Hi, אסף חיים פרייס wrote: I've many .tec files that been created after mistakly deleting photos on my android. I'm trying to edit them, by deleting the 6 first chrs. and the last one. Then, I'm changing the file from .tec to .jpg. I have 3000 files!!! Is there any way to make it

Re: my invisible characters are not displayed properly

2014-04-15 Thread Jürgen Krämer
Hi, FlashBurn wrote: For some reason my invisible characters are not displayed properly. I have to source my vimrc a second time for the 'list' setting to work. Here is my setting for 'listchars' set listchars=tab:►\ ,eol:¬,trail:● The results of the invisibles not being displayed is in

Re: how can I configure word highlighting in VIM ?

2014-04-01 Thread Jürgen Krämer
[Text re-ordered; please don't top-post] Hi, Arup Rakshit wrote: On Sun, Mar 30, 2014 at 8:12 AM, John Beckett johnb.beck...@gmail.com mailto:johnb.beck...@gmail.com wrote: Arup Rakshit wrote: Subject: how can I configure word highlighting in VIM ? If you mean by

Re: Question about surround.vim and visual selection

2014-03-11 Thread Jürgen Krämer
Hi, Niels Kobschätzki wrote: is there a way when using surround.vim with visual selection doesn't add white space? When having: This is some text and I select some and hit S( it becomes: This is ( some ) text but I want This is (some) text use the closing parenthesis instead,

Re: gd command doesn't go to definition of identifier

2014-02-13 Thread Jürgen Krämer
Hi, Paul wrote: I a *test* file tmp.tex consisting solely of the following LaTeX code: Start LaTeX code \DeclareAcronym{myacro}{ short = MYACRO, long = some longer expansion of myacro } \section {Big long section name that never ends but keeps going and going

Re: Automatically open fold with enter in normal mode?

2013-08-16 Thread Jürgen Krämer
Hi, Reckoner wrote: I'm using vim 7.3 on windows 8. Is there a way to setup a normal mode mapping where if I hit enter on a folded section, it will open that section (as in zO). The trick is that I only want that mapping to work *while on a folded line* and not otherwise map enter

Re: Insert a tab during the process of an interactive function

2013-08-14 Thread Jürgen Krämer
Hi, tjg wrote: I have a file where all the lines have the same structure : ID (integer), Type (text), Description (text). These fields are separated by tabs (ts=7) To add new items I have created (well, not yet, as you will see) an interactive function which goes : function NewData ()

Re: vim vs nano on editing system files

2013-08-08 Thread Jürgen Krämer
Hi, Dahong Tang wrote: Here are the commands that I tested: $ sudo touch testvim $ ls -al -rw-r--r-- 1 root root 0 Aug 8 08:25 testvim $ vi testvim :w! :q $ ls -al -rw-r--r-- 1 user user 0 Aug 8 08:26 testvim I don't understand why vim would override both file permission and

Re: Setting titleold does not work

2013-05-15 Thread Jürgen Krämer
Hi, Ryan wrote: I've tried to set the title as shown in the docs: set title let titlestring = titlestring let titleold = titleold The title string works just fine. But, the title old does not appear to work. I am using xterm in Yakuake Version 2.9.6 KDE Dev Platform 4.4.5

Re: delete last character of multiple lines

2013-05-08 Thread Jürgen Krämer
: what should i do in order to delete last character of multiple lines?\ How about visually selecting the lines and then: :','norm! $x or :','s/.$// Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has

Re: Argument List question

2013-04-10 Thread Jürgen Krämer
Hi, Jeff Lanzarotta wrote: I have a question about the argument list. What commands would clear or change the argument list other than the typical :arg related commands like :argadd, :argdelete, etc. The reason for asking is that it has been brought to my attention that my plugin,

Re: Argument List question

2013-04-10 Thread Jürgen Krämer
Hi, Jeff wrote: Thanks Jürgen. As far as I can tell though, I am not using :next or any related command :( it seems that :drop also replaces the argument list. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it

Re: _vimrc not run when invoking gvim on text file from context menu

2013-02-21 Thread Jürgen Krämer
Hi, Paul wrote: In Windows 7, I got a program pinned to the taskbar. It is basically a shortcut with the Target field set to: C:\Program Files (x86)\Vim\vim73\gvim.exe -u _vimrc and the Start in field set to $USERPROFILE. The _vimrc is also in $USERPROFILE, so it runs when gvim is

Re: which file is being edited?

2013-02-18 Thread Jürgen Krämer
Hi, shawn wilson wrote: How do I get the full path of the file I'm editing? register % contains the name of the current file. You can pass '%' as an argument to the expand() function: :echo expand('%') or :let filename = expand('%') This might give you the file name with a path

Re: New vs split

2013-02-04 Thread Jürgen Krämer
Hi, Ven Tadipatri wrote: Is there a difference between new and split? If they're the same, is one considered more 'standard'? Or if they're different, when would you use one versus the other? I think both have vertical equivalents right (vnew and vsplit)? their behavior is the same if you

Re: how to make a file relative to $VIM

2013-02-01 Thread Jürgen Krämer
Hi, Christian Brabandt wrote: On Fri, February 1, 2013 10:34, Jeri Raye wrote: On Fri, Feb 1, 2013 at 9:59 AM, Christian Brabandt cbli...@256bit.org wrote: Hi Jeri! [...] You need to expand the environment variables using expand() [...] When I type : let MRU_File =

Re: How to let gvim start on 2nd monitor

2013-02-01 Thread Jürgen Krämer
Hi, Jeri Raye wrote: Reid [...] I'm using windows 7 on a laptop with a secondairy monitor which I prefer to use for coding. [...] This is generally controlled by the desktop/window manager, rather than the application -- so look at the options that your desktop/window manager offers.

Re: How to run shell commands containing non-ascii characters from Vim

2013-01-21 Thread Jürgen Krämer
Hi, av wrote: This is what I tried: For french this works: echo system('chcp 850 type ' . iconv('c:\temp\été2012.txt', enc, 'latin1') . '') Even simply this works without the chcp (probably because my shell is cp850 by default): echo system('type ' . iconv('c:\temp\été2012.txt',

Re: vim: how to display a cross through line on the text?

2012-11-16 Thread Jürgen Krämer
Hi ping wrote: I know vim is an pure text editor, not word or rendering system. but currently I have it displaying the bold, italic, underline with an asciidoc syntax highlight file. https://github.com/dagwieers/asciidoc-vim it is surprisingly good in terms of displaying effect and

Re: Reading variables of a buffer/window that is not in scope

2012-10-02 Thread Jürgen Krämer
Hi, Brandon Coleman wrote: I would like to read the contents of variables for buffers that are not in scope. How would I go about doing this? Is there an example of a way to loop through all of the buffers? is there a command lookupWinVar(1,testVar)? I don't know if there is a function

Re: Mappings for reusing result of function without defining additional function

2012-09-17 Thread Jürgen Krämer
Hi, skeept wrote: When using a function from a plugin, say F1() I want to check if the result is not the empty string, if it is call some other function, F2(), if it is not execute the string resulting from function F1(). Calling F1() has a side effect like moving the cursor around so I

Re: bufexplorer has conflicts with python.vim

2012-09-06 Thread Jürgen Krämer
Hi, Tony Mechelynck wrote: In the ftplugin/python.vim included in Bram's latest official sources (ftplugin/python.vim Last Change: Wed, 21 Apr 2004 13:13:08 CEST, Mercurial tag v7-3-659 dated Wed Sep 05 19:17:42 2012 +0200), I see two lines' discrepancy: the closest I come to what could

Re: CTRL-W in insert mode

2012-08-27 Thread Jürgen Krämer
Hi, A Loumiotis wrote: CTRL-W in insert mode deletes the word (part of the word) left of the cursor. Is it possible to undo this action? perhaps the following map does what you want inoremap c-w c-guc-w This remaps the Ctrl-W to first break the undo sequence and then execute the

Re: wildmenu=full matching

2012-08-15 Thread Jürgen Krämer
Hi, David Fishburn wrote: Just an observation, which looks wrong. :set wildmode=full :set witab I get these matches listed: weirdinvert wildcharm wildignorecase wildmode winaltkeys winheight winfixwidth winminwidth wildcharwildignore wildmenu

Re: Remove spaces and line breaks and make single line wihtout spaces

2012-07-20 Thread Jürgen Krämer
Hi, Am 20.07.2012 11:09 schrieb vicky b vickyb2...@gmail.com: HI, I dint find any specific solution for my problem even after much of googling i have following line ?xml version=1.0 encoding=UTF-8?SupportItem ItemInfo NameFirst Name/Name TypeINPUTEXT/Type Value/Value

Re: Remove spaces and line breaks and make single line wihtout spaces

2012-07-20 Thread Jürgen Krämer
Am 20.07.2012 11:30 schrieb Dominique Pellé dominique.pe...@gmail.com: Jürgen Krämer j...@habel.de wrote: Hi, Am 20.07.2012 11:09 schrieb vicky b vickyb2...@gmail.com: HI, I dint find any specific solution for my problem even after much of googling i have following line

Re: vim abbreviate help...

2012-07-03 Thread Jürgen Krämer
Hi, Roberto S. wrote: Hi sorry for this stupid question, but I'm learning vim. I would like to create a pkg abbreviation that create the: package org.hello.world; row in a file found in directory: current_dir/src/main/java/org/hello/world/ I have added this to my .vimrc: autocmd

Re: It works but it doesn't work

2012-06-29 Thread Jürgen Krämer
Hi, howard Schwartz wrote: I've got two simple ex commands in a larger script. When I run them on the file, direct from the ex command line, they work fine. When I run them from the script, they do not work. Even If I simply jut put the commands below in a simple script file, script.vim,

Re: problem: redirection of global print to register

2012-06-15 Thread Jürgen Krämer
Hi, Nick Shyrokovskiy wrote: Say initially I have a buffer: --buffer-- a1 a2 - if i sequentially issue: :redir @c :g/a./ :redir END :put c I'll get and i'll see 2 matched lines in vim output as :g is not silent --buffer-- a1 a2 a1 a2 -- but if

Re: Jump to tag command doesn't work in gvim under Windows 7

2012-05-31 Thread Jürgen Krämer
Hi, Väinö Leppänen wrote: The mouse version of this command actually work (gLeftMouse and C-LeftMouse), but the keyboard version CTRL-] doesn't for some reason. Any ideas? on Windows the behaviour of Ctrl plus a non-letter is independent of the actual keyboard layout (at least inside

Re: insert mode mappings

2012-05-31 Thread Jürgen Krämer
Hi, sinbad wrote: can the insert mode mappings be made available for the text entered during searches / and ?. use :map! and :noremap! instead of :imap and :inoremap if you want to use a mapping in insert and command-line mode. Note that this also makes the mapping available after a :.

Re: insert mode mappings

2012-05-31 Thread Jürgen Krämer
Hi, Jürgen Krämer wrote: sinbad wrote: can the insert mode mappings be made available for the text entered during searches / and ?. use :map! and :noremap! instead of :imap and :inoremap if you want to use a mapping in insert and command-line mode. Note that this also makes

Re: Toggle paste and nonu in one keystroke

2012-05-11 Thread Jürgen Krämer
Hi, Dotan Cohen wrote: On Fri, May 11, 2012 at 2:58 PM, Christian Brabandt cbli...@256bit.org wrote: However I am having trouble with the Insert version. I am trying this code: :inoremap F2 Esc:set nu! paste!cr However, when I press F2 in Insert mode I get the text F2 inserted into the

Re: How I can run vim commands from a bash script?

2012-04-24 Thread Jürgen Krämer
Hi, Marc Weber wrote: vim was not designed for that kind of task. You can pass commands via -c and --cmd (see --help). Give this a try: sed -i 's/foo/bar/' *.txt -i = write back file in place vim foo will open file name 'foo'. vim '%/s...' will open file name '%/s...' (and

Re: :il[ist] with numeric patterns

2012-04-24 Thread Jürgen Krämer
Hi, esquifit wrote: According to the help (:he :ilist) :il /foo/ would find all occurrences of the string 'foo' while :il foo would find all occurrences of the pattern \foo\, that is, 'foo' as a whole word. I've found that when the pattern is a number this is no longer the case: :il

Re: existance of :diffoff

2012-04-19 Thread Jürgen Krämer
Hi, Bee schrieb: I use vim on Mac, Linux, Windows with versions 6 and 7. :diffoff! works with version 7 but does not exist in version 6. Currently I do this: function! DiffOff() if v:version 700 windo set nodiff foldcolumn=0 noscrollbind nowrap scrollopt-=hor else

Re: existance of :diffoff

2012-04-19 Thread Jürgen Krämer
Hi, Bee wrote: On Apr 18, 11:13 pm, Jürgen Krämer jottka...@googlemail.com wrote: Additionally check if the window is really in diff mode: function! DiffOff() if exists(':diffoff') == 2 windo if diff | set nodiff foldcolumn=0 noscrollbind nowrap scrollopt-=hor | endif

Re: matchend() and \zs

2012-04-19 Thread Jürgen Krämer
Hi, rameo wrote: My file - first line: an 91.010 System.-sep010- Nop I want to copy all numbers after -sep echo match(getline(1), 'sep\zs\d\+\ze-') gives 23 as output. All ok. but echo matchend(getline(1), 'sep\zs\d\+\ze-', 23) gives -1 as output. Why? because the 23 that was

Re: Sliding the visual block highlighted window

2012-04-12 Thread Jürgen Krämer
Hi, Marcin Szamotulski wrote: On 07:57 Wed 11 Apr , Jürgen Krämer wrote: vnoremap c-j @='jojo'cr vnoremap c-k @='koko'cr Can you explain (or give :help hint) how @= works here that makes the trick. @ executes the contents of a register and can be prefixed with a count. So if you

Re: Sliding the visual block highlighted window

2012-04-10 Thread Jürgen Krämer
Hi, Taylor Hedberg wrote: rcvim, Tue 2012-04-10 @ 12:24:57-0700: Suppose I have text file that includes a vertical column of zip codes. I want to yank 10 codes so I move to the desired upper left corner and hit ctrl-v, then move the cursor down 10 rows and over 5 columns. Now I have

Re: vimgrep

2012-04-04 Thread Jürgen Krämer
Hi, [please don't top-post] hilal Adam wrote: Yes. You're right \*\* was one of the approaches I used. Unfortunately * is treated as a metacharacter/special character/keyword by grep/vimgrep/c language and this where the difficulty is originating from. I tried your suggestion,

Re: Highlighting :g//

2012-04-02 Thread Jürgen Krämer
Hi, Paul wrote: Often I'll want to see a list of lines that contain a pattern. I'll do ':g/pattern/', sometimes followed by # if I want the line numbers. Sometimes I'd like to see where in the line the pattern matched, so, is there a way to have the output of :g// highlight the pattern?

Re: maps in if statement can not work.

2012-04-02 Thread Jürgen Krämer
Hi, stardiviner wrote: = On [2012-03-28 07:20:26 +0200]: Jürgen Krämer Said: stardiviner wrote: I found a tips on wikia, it can autocapitalize first character in sentence. Bellowing is the code in my vimrc. But I found that those mappings in if statement can not work. Is there anyone

Re: :help WITHOUT split screen

2012-03-30 Thread Jürgen Krämer
Hi, Tarlika Elisabeth Schmitz wrote: This is one of my biggest bug bears and it drives me absolutely nuts: Is there a way to prevent :help from splitting the window?! I never, ever want a horizontal split. I'd just like to see the help text in a new tab. I mostly use gvim, sometimes

Re: maps in if statement can not work.

2012-03-27 Thread Jürgen Krämer
Hi, stardiviner wrote: I found a tips on wikia, it can autocapitalize first character in sentence. Bellowing is the code in my vimrc. But I found that those mappings in if statement can not work. Is there anyone know why ? (The original code does not have the if statement. I add it by

Re: StatusLine and conditionnal style

2012-03-20 Thread Jürgen Krämer
Hi, Gautier DI FOLCO wrote: Hi, Le 19 mars 2012 20:11, Jürgen Krämer j...@habel.de mailto:j...@habel.de a écrit : What do you mean with are vertically cut? Don't you see the complete glyphs? This might be because these glyphs might be wider than normal characters

Re: StatusLine and conditionnal style

2012-03-20 Thread Jürgen Krämer
Hi, Gautier DI FOLCO schrieb: Hi, Le 20 mars 2012 07:25, Jürgen Krämer jottka...@googlemail.com mailto:jottka...@googlemail.com a écrit : sorry, but I don't understand your explanation. sorry, I do not have a good mastery of English. no problem. Here is an example without

  1   2   3   4   >