Re: Importing values from vim to python in vim9

2023-12-06 Thread rameo
ers in the function > definition in quotes? > > Salman > > On Tue, Dec 5, 2023, 17:14 Christian Brabandt wrote: > >> >> On Di, 05 Dez 2023, rameo wrote: >> >> > I installed vim 9 but still have multiple functions written in old >> vimscript. >&g

Re: Importing values from vim to python in vim9

2023-12-05 Thread rameo
able1")) variable2 = str(vim.bindeval("a:variable2")) This works. But now it's binary isn't it (b'value')? How do I get it as text again? Isn't there a better solution? Thanks, Rameo On Tuesday, December 5, 2023 at 11:14:21 PM UTC+1 Christian Brabandt wrote: > > On Di, 05 Dez

Importing values from vim to python in vim9

2023-12-05 Thread rameo
I installed vim 9 but still have multiple functions written in old vimscript. I've read that functions written in old vimscript still work. However I noticed that importing variables into Python `vim.eval("a:myvariable")` no longer works I don't always get the right values imported.

Re: Command Line Bookmark manager

2021-07-19 Thread rameo
Thank you, even though it looks really good, it's much more than I wanted. I was looking for something in vim itself and only focused on saving vim search/exec commands (like a bookmark manager). On Saturday, July 17, 2021 at 5:37:56 PM UTC+2 stevelitt wrote: > rameo said on Fri, 16 Jul 2

Re: Command Line Bookmark manager

2021-07-16 Thread rameo
Hi, Vim command line commands On Friday, July 16, 2021 at 4:37:21 PM UTC+2 rwmit...@gmail.com wrote: > On Friday, July 16, 2021 at 5:37:44 AM UTC-4 rameo wrote: > >> Hi, >> >> Is there a possibility in Vim or a script that allows us to Bookmark or >> Pin Comma

Command Line Bookmark manager

2021-07-16 Thread rameo
Hi, Is there a possibility in Vim or a script that allows us to Bookmark or Pin Command Line commands? I know there is such a thing for files and directories (eg FavMenu) but is there something similar for search and execute commands? Thanks in advance. -- -- You received this message

Re: Vim9 - Python/Lua interface

2020-05-13 Thread rameo
python regex in the command line. Hopefully it'll work out. I'm also thinking of a way to leave python functions just like in vimscript (return). On Wednesday, May 13, 2020 at 12:54:19 PM UTC+2, rameo wrote: > > I first came into contact with Vim about 15 years ago. > A few times I un

Vim9 - Python/Lua interface

2020-05-13 Thread rameo
I first came into contact with Vim about 15 years ago. A few times I uninstalled it and reinstalled it a while later. After a few months I was convinced it was the best text editor I had ever seen. I only noticed how much value it had when I wrote scripts in vimrc myself and changed

Vim external command output encoding

2019-02-15 Thread rameo
I am trying to get the output from Everything Search in Vim using Everything commandline (es.exe) This works great in cmd shell but when I do the same in gvim I do not see any accents. E.g. :r !es *.doc returns all doc files, but all accents (éèòì etc) are not shown. No problem if I use this

Re: python 3

2017-11-24 Thread rameo
On Wednesday, November 22, 2017 at 11:31:10 PM UTC+1, Ni Va wrote: > Hi, > > Just try from vim.8.0.1330 to execute :py3 import sys (with python v3.7.0a2) > fails and exit vim. > > > May I miss some things to do? > Thank you You're using Python 3.7. Vim is made for Python 3.5. You need to

Re: Vim as external editor for thunderbird

2017-02-06 Thread rameo
Guido, I use http://www.listary.com/text-editor-anywhere Saluti da una ventosa Francia. :) ~R. -- -- 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 ---

idx-edx: Different Character count in Vim and Python

2017-01-25 Thread rameo
Example: s="I like crème caramel but not only caramel I also like crème fraîche." Searching the idx-edx numbers of the matches of the word "crème": echo matchstrpos(s, "crème") --> 7,13 echo matchstrpos(s, "crème",14) --> 55,61 I do have a python function in which I transform the above

python search regex

2016-11-23 Thread rameo
A time ago, I asked if it possible to add python regex to vim. No one answered that question. VIM is a great editor and the use of Vimscript makes it even better. Then I started to learn Python and noted that Bram has integrated Python in Vim. I transformed many scripts from Vimscript to

visual mode detection

2016-08-21 Thread rameo
I'm using the latest Nightly Vim Windows build v7.4.2232 I noted that the last builds don't detect visual mode. in my menu.vim nnoreme 93.02.12 \ :call VerticalSort("%") vnoreme 93.02.12 \ :call VerticalSort("''<,''>") When I don't select anything the first line must be the current one: "%"

Python Regex in a Vim Search

2016-05-11 Thread rameo
I would like to ask whether it is possible to add python regex to the VIM search in a future VIM release? p.e. We could use a `P` or something like that in a vim search to indicate that it concerns a Python regex p.e. `/P'pythonregex'` If we have this we can use the same regex in the other

Re: Capture columns nummers of matches ending with double byte chars

2016-04-26 Thread rameo
Op dinsdag 26 april 2016 09:14:52 UTC+2 schreef rameo: > Op dinsdag 26 april 2016 08:14:33 UTC+2 schreef Christian Brabandt: > > Hi rameo! > > > > On Mo, 25 Apr 2016, rameo wrote: > > > > > > > > > > > > > It is muc

Re: Capture columns nummers of matches ending with double byte chars

2016-04-26 Thread rameo
Op dinsdag 26 april 2016 08:14:33 UTC+2 schreef Christian Brabandt: > Hi rameo! > > On Mo, 25 Apr 2016, rameo wrote: > > > > > > > > > It is much better to download sources from https://github.com/vim/vim. > > > > > > > Found it

Re: Capture columns nummers of matches ending with double byte chars

2016-04-26 Thread rameo
> > It is much better to download sources from https://github.com/vim/vim. > Found it: https://github.com/vim/vim-win32-installer/releases However... Tried: gvim_7.4.1782_x86.exe gvim_7.4.1786_x86.exe Both gives an error: Error detected while processing vimrc_example.vim line 114: E919:

Re: Capture columns nummers of matches ending with double byte chars

2016-04-25 Thread rameo
Op maandag 25 april 2016 22:26:27 UTC+2 schreef Ken Takata: > Hi rameo, > > 2016/4/23 Sat 21:37:15 UTC+9 rameo wrote: > > Searchpos() doesn't return the right end value of a match if the match end > > with a double byte character (èéòìùá...). (encoding utf-8) > > Is

Re: Capture columns nummers of matches ending with double byte chars

2016-04-23 Thread rameo
Searchpos() doesn't return the right end value of a match if the match end with a double byte character (èéòìùá...). (encoding utf-8) Isn't this a bug Would it be possible to add a feature in Vim like finditer in Python? Searchpos() searches the entire file till stopline. finditer returns

Capture columns nummers of matches ending with double byte chars

2016-04-21 Thread rameo
Since I use Vim I have troubles with double byte characters. I want to capture all strings of matches together with startcolumn and endcolumn of a match (line by line). I don't need only the strings but also the columnnumbers for other functions. The last few years I used match/matchend then I

Re: Vim Function: return from within Python Code

2016-03-21 Thread rameo
@ZyX, Thanks, You mean to extract the Python code to a .py file and import it in my vim function? I still don't understand how to exit from my pythoncode from within my python code. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text

Vim Function: return from within Python Code

2016-03-19 Thread rameo
I have a VIM function with a lot of code written in python. There are many loops and sub-loops with this kind of code: if this exit else do this Does anyone know how to exit the python code and return to vim? (or even better "how to exit the function from within python code?") sys.exit()

Start/end positions of all matches on a single line

2016-03-19 Thread rameo
I would like to know the start/end positions of matches on a few lines. These linenumbers are in a list "list". I want to add the startpositions of all matches in the list "idx" and the endpositions of matches in the list "edx" idx = [] edx = [] for n in range(0,len(list)-1) "idx positions

Re: Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-08 Thread rameo
Thanks but I still don't understand it. No problem. Hope I'll not have problems with `vim.current.buffer[linenr -1]`. My experience with Python tells me that Python language is much easier then vimscript. Things can be done easier with the many Python modules using less code then in vimscript.

Re: Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-08 Thread rameo
> Better `vim.Function('getline')(linenr) You seems to know everything in every computer language :) Yes I use Pyth3 and many times also `vim.current.buffer[linenr-1]` or things like this `r = vim.current.buffer[startline:endline]` To avoid decoding errors it is better to switch all these

Re: Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-08 Thread rameo
Thank you. You're right. It is not a question of decoding a list but decoding a string. Never did anything before with string encoding. I've got it: I cannot use searchpos() to use with python. Searching positions must be done in python (p.e. finditer). BTW I thought that ['encoding'] was a

Re: Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-08 Thread rameo
Can't find anything on the net about string.encode(vim.options[encoding]). No info either in Vim documentation: if_pyth Let say I create my list "MyPositions" with start/end position of matches using searchpos() in vim. Then in my python code I have to do something like this to convert it to

Re: Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-07 Thread rameo
> In Python you are not using *byte* counts, it indexes *unicode > codepoints*. You may convert unicode Python objects to bytes objects > by using `string.encode(vim.options['encoding'])`, use > `.decode(vim.options['encoding'])` to convert back. bytes objects are > indexed by bytes. You may

Is there any way to count all latin characters in utf-8 as 1 byte?

2016-03-07 Thread rameo
I use searchpos() to capture start/endcolumns of a matches. Then I use the results in Python code to transform the text. However I noted that latin characters as 'èéàòìù' are counted as 1 byte in Python but 2 bytes in Vim and the output is not as expected. Is there any way to resolve this

Vim and Python

2016-03-04 Thread rameo
Vim and Python is an incredible power combination. Vimscript is great, Python makes it even greater, faster and easier. What I just want to ask is if it possible in a future release to include the python regex code as well. Now I do a search in vim, capture the search/matches and use it in a

Capture confirmation flag

2016-02-15 Thread rameo
"linenumber".s/search/replace/gc Replace with 'replace' (y/n/a/q/l/^E/^Y)? Do you know if there is any way to capture which one has been clicked? -- -- 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

inputdialog() font

2016-01-24 Thread rameo
I use this monospaced font in VIM (in _vimrc): set guifont=DejaVu_Sans_Mono:h10 However in the inputdialog window the font is not this monospaced font but some NON monospaced font (it seems to me that it is Arial). Is it possible to change the font in inputdialog()? (text is not aligned in

Python 3 support

2016-01-22 Thread rameo
I've installed the latest vim beta: gvim-7-4-1087.exe Doesn't the beta support python 3? `import vim` doesn't work. Vim could not load library python27.dll I've installed python 3.5. uninstalled it and installed python 3.4 uninstalled it and installed 3.3 Still same error. -- -- You

Python 3 support

2016-01-22 Thread rameo
I've installed the latest vim beta: gvim-7-4-1087.exe Doesn't the beta support python 3? `import vim` doesn't work. Vim could not load library python27.dll I've installed python 3.5. uninstalled it and installed python 3.4 uninstalled it and installed 3.3 Still same error. -- -- You

Re: Python 3 support

2016-01-22 Thread rameo
Op vrijdag 22 januari 2016 22:18:03 UTC+1 schreef Christian Brabandt: > Hi rameo! > > On Fr, 22 Jan 2016, rameo wrote: > > > I've installed the latest vim beta: gvim-7-4-1087.exe > > > > Doesn't the beta support python 3? > > > > `import vim` do

Re: Inputdialog - Aligning

2014-08-02 Thread rameo
On Sunday, July 27, 2014 11:51:30 AM UTC+2, rameo wrote: I noted that Vim uses the proportional windows default font for his inputdialog text. (The same font as the gvim menu font) If I create an inputdialog like this: Let question = Which formatting? \ \n \ \n1) %.2f

Inputdialog - Aligning

2014-07-27 Thread rameo
I noted that Vim uses the proportional windows default font for his inputdialog text. (The same font as the gvim menu font) If I create an inputdialog like this: Let question = Which formatting? \ \n \ \n1) %.2f -- Floating point number, 2 decimals \ \n2) %10d -- Integer Right

Re: Encoding and Fileencoding of a latin1 file

2014-07-06 Thread rameo
Thank you very much Ben for your great explication. Not easy to understand. I still don't understand why my vimrc and menu.vim, containing both french characters as œu, could be read in latin1 in the past, without any problem or error. (The only encoding line I had in my vimrc file at that

Re: Encoding and Fileencoding of a latin1 file

2014-07-05 Thread rameo
Ben, Try to write these french words in a file with a latin1 fileencoding: bœuf, cœur, manœuvre, œil (beef, heart, manoeuvre, eye) Close this file. Set encoding to utf-8 in your vimrc. Open the file. Encoding is utf-8 Fileencoding is latin1 (:set fileencoding?), converted is written after the

Match all characters enclosed in brackets

2013-08-09 Thread rameo
I have trouble finding the correct regex. I know that a sequence of characters enclosed in brackets means their optional: [xyz] means any 'x' OR 'y' OR 'z' but how can I find them all? any 'x' AND 'y' AND 'z' in whatever sequence and quantity p.e. Match first an uppercase character then

Re: using !sort in windows commandline: passing special characters

2013-07-22 Thread rameo
more difficult with the vim sort command. However, thanks so far. Rameo -- -- 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

using !sort in windows commandline: passing special characters

2013-07-21 Thread rameo
I use cygwin on my windows system to use unix commands from vim commandline. This is written in my text file: Adam|12345 Bob|34567 Joe|56789 Sam|45678 Wendy|23456 When I use: :%!sort -k2n -t'|' it gives an error: ''' is not recognized as an internal or external command, operable program or

Re: Cursor question

2013-03-14 Thread rameo
this message. Well if there is nothing I can do, I have to accept it as it is :) On Wednesday, March 13, 2013 10:34:22 AM UTC+1, rameo wrote: In insert mode I have a blinking vertical bar as cursor. I noted a strange thing when I'm in insert mode: I have to click with the mouse on the next

Cursor question

2013-03-13 Thread rameo
In insert mode I have a blinking vertical bar as cursor. I noted a strange thing when I'm in insert mode: I have to click with the mouse on the next letter in order to put the vertical bar before this letter. When I click on the space between two letters the cursor goes to the space before the

command using numeric keypad

2013-01-27 Thread rameo
I would like to associate commands with the numeric keypad ctrl + - (number 6 on the numeric keypad with numlock enabled) I don't know how to do this. Can anyone help me? -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are

Re: email plugin

2012-11-29 Thread rameo
On Friday, November 30, 2012 12:05:41 AM UTC+1, Bost wrote: Is there any good email plugin you can recommend me guys? It seems like there isn't any star plugin for handling emails in vim, in fact google search doesn't return many useful links to this topic. So, I'd like to hear your tips

Highlight after invoking a function

2012-05-02 Thread rameo
I would like to know how to highlight matches after invoking a function p.e. function! s:MyFunction() let search = '\d\+' let @/ = search return normal n endfunction :call SIDTest()CR does not highlight the matches. I know I can add :set hlsCR after the function call but that

Re: Colorschemes and split window

2012-04-30 Thread rameo
It seems that I have found the solution (after many many hours of trying :-( ) I created the function below. The function must do this (and seems to do it): a) when there is only 1 window: check if filetype is vim -- Dark_ColorScheme if filetype is not vim -- Light_ColorScheme

Re: Colorschemes and split window

2012-04-29 Thread rameo
On Saturday, April 28, 2012 12:39:51 AM UTC+2, Tony Mechelynck wrote: On 27/04/12 23:41, rameo wrote: On Friday, April 27, 2012 8:29:03 PM UTC+2, Tony Mechelynck wrote: On 27/04/12 18:34, rameo wrote: On Friday, April 27, 2012 6:18:29 PM UTC+2, Ben Fritz wrote: On Friday, April 27, 2012

Re: Colorschemes and split window

2012-04-28 Thread rameo
On Saturday, April 28, 2012 12:39:51 AM UTC+2, Tony Mechelynck wrote: On 27/04/12 23:41, rameo wrote: On Friday, April 27, 2012 8:29:03 PM UTC+2, Tony Mechelynck wrote: On 27/04/12 18:34, rameo wrote: On Friday, April 27, 2012 6:18:29 PM UTC+2, Ben Fritz wrote: On Friday, April 27, 2012

Colorschemes and split window

2012-04-27 Thread rameo
I use this code in my .vimrc to use my dark colorscheme when I open a .vim page and my light colorscheme when I open whatever other page: augroup filetype_colorscheme au BufEnter * \ if !exists('b:colors_name') \ | if ft == vim \ | let b:colors_name =

Re: Colorschemes and split window

2012-04-27 Thread rameo
On Friday, April 27, 2012 6:18:29 PM UTC+2, Ben Fritz wrote: On Friday, April 27, 2012 10:56:55 AM UTC-5, rameo wrote: I use this code in my .vimrc to use my dark colorscheme when I open a .vim page and my light colorscheme when I open whatever other page: augroup filetype_colorscheme

Re: Colorschemes and split window

2012-04-27 Thread rameo
On Friday, April 27, 2012 8:29:03 PM UTC+2, Tony Mechelynck wrote: On 27/04/12 18:34, rameo wrote: On Friday, April 27, 2012 6:18:29 PM UTC+2, Ben Fritz wrote: On Friday, April 27, 2012 10:56:55 AM UTC-5, rameo wrote: I use this code in my .vimrc to use my dark colorscheme when I open

Re: questions about submatch()

2012-04-24 Thread rameo
Tnx John and Ben. Please let me ask one more question about submatch() If I use submatch like this: :%s/'pattern'/\=MyFunction(submatch())/g function! MyFunction(m) variable x do something with variable x return x endfunction I would like to confirm (with a c flag) all single substitutions

Re: questions about submatch()

2012-04-24 Thread rameo
On Tuesday, April 24, 2012 10:01:35 AM UTC+2, JohnBeckett wrote: rameo wrote: If I use submatch like this: :%s/'pattern'/\=MyFunction(submatch())/g That gives: E119: Not enough arguments for function: submatch E116: Invalid arguments for function MyFunction(submatch()) I would like

questions about submatch()

2012-04-23 Thread rameo
that it has to make a float value when the increment/decrement value or the number self is a float, else it has to see the value as integer? Tnx, Rameo -- 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

Re: questions about submatch()

2012-04-23 Thread rameo
On Monday, April 23, 2012 8:41:33 AM UTC+2, rameo wrote: Hello to all readers, I use submatch() to increment/decrement numbers in a text. My questions are: 1) In my country the comma is seen as decimal separator. submatch() doesn't seem to recognize the comma but use the dot

Re: matchend() and \zs

2012-04-20 Thread rameo
On Thursday, April 19, 2012 8:12:55 PM UTC+2, Ben Fritz wrote: On Thursday, April 19, 2012 5:35:11 AM UTC-5, 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

Re: matchend() and \zs

2012-04-20 Thread rameo
On Friday, April 20, 2012 5:52:37 PM UTC+2, Ben Fritz wrote: On Friday, April 20, 2012 2:45:28 AM UTC-5, rameo wrote: After all these match() and matchend() problems, I'm trying to view if matches can be captured by using the submatch(0) and adding them to a register. Isn't

Re: matchend() and \zs

2012-04-20 Thread rameo
On Friday, April 20, 2012 8:51:37 PM UTC+2, Ben Fritz wrote: On Friday, April 20, 2012 11:30:02 AM UTC-5, rameo wrote: On Friday, April 20, 2012 5:52:37 PM UTC+2, Ben Fritz wrote: On Friday, April 20, 2012 2:45:28 AM UTC-5, rameo wrote: After all these match() and matchend

Re: matchend() and \zs

2012-04-19 Thread rameo
On Thursday, April 19, 2012 1:09:10 PM UTC+2, jott...@googlemail.com wrote: 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

Temporary stop Relative Line number where it is.

2012-04-12 Thread rameo
I like Relative Line number (rnu) and use it often. But when something is not visible in my vim window I have to scroll down and Relative Line numbers changes with it. Sometimes when I write functions I receive error messages; error at line .. and I have to count how many lines are between the

Re: match and matchend with a negative lookbehind

2012-04-06 Thread rameo
Hi Ben and John, Thank you for your answers. Ben, Yes I'm talking about a simple / search Sorry that I didn't add an example. Please see the example in John example. This is exactly what I've done and noted. John, Yes, that's what I getting. I had never seen such a strange behavior with

Re: match and matchend with a negative lookbehind

2012-04-06 Thread rameo
. This is unlike searching in a buffer; the look behind assertion does look behind the start position of the search. Rameo, is this what you're getting at? I think you've analyzed it perfectly! Looking closer at the help for match(), I see: For a String, if {start} 0

match and matchend with a negative lookbehind

2012-04-05 Thread rameo
I noted a strange behavior with match and matchend when I use a regex with a negative lookbehind. p.e. text in document: -2 3-4-5-6-7-8 search string: \([0-9-]\@!-\)\?\d[0-9]* it highights -2 3 4 5 6 7 8 (as I aspected) but when I check the match and matchend in order to copy the matches,

Re: Horizontal Ruler in interface?

2012-03-27 Thread rameo
On Sunday, March 25, 2012 12:21:43 PM UTC+2, coot_. wrote: 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 If you don't want the first line this

Re: Horizontal Ruler in interface?

2012-03-26 Thread rameo
On Sunday, March 25, 2012 12:21:43 PM UTC+2, coot_. wrote: On 11:16 Sun 25 Mar , Marcin Szamotulski wrote: On 03:00 Sun 25 Mar , rameo wrote: On Saturday, March 24, 2012 2:22:26 PM UTC+1, volker@gmx.de wrote: On Sat, 24 Mar 2012 14:06:30 +0100 Christian Brabandt wrote

Re: Horizontal Ruler in interface?

2012-03-25 Thread rameo
On Saturday, March 24, 2012 2:22:26 PM UTC+1, volker@gmx.de wrote: On Sat, 24 Mar 2012 14:06:30 +0100 Christian Brabandt wrote: Hi rameo! On Fr, 23 Mär 2012, rameo wrote: I would like to know if it is possible in a future gvim release to add a horizontal ruler like

Re: Horizontal Ruler in interface?

2012-03-24 Thread rameo
Hi Ben, Yes I was thinking of a horizontal ruler with numbers as in p.e. wordpad, psp ultraedit and other editors. Agree, that I had to post the message in vim-dev. Why I need this feature? I often use the /%columnnrC in code. I often do column operation p.e. delete from column to column

Horizontal Ruler in interface?

2012-03-23 Thread rameo
I would like to know if it is possible in a future gvim release to add a horizontal ruler like the actual vertical ruler (set ruler) (p.e. set:coruler -- set column ruler) I would like to see always the columnnumbers 123456789*123456789*123456789* etc I know there is a plugin to add a horizontal

h j k l -- keys

2011-12-16 Thread rameo
I just want to know why Vim developers (and other software) have chosen the h j k l keys for left, down, up and right and not the j k l ; keys? I type with ten fingers and with touch typing, the right hand is on the j k l ; keys. To go to left I have to switch my forefinger from the j to the h.

Re: Deleting duplicate lines _without_ sorting

2011-07-08 Thread rameo
Have you checked the one I mentioned above? The one above is working in menu-vim (the pipe symbol has to be escaped in menu.vim) To let it work in the commandline the escape before the pipe symbol has to be removed: g/^/kl |if search('^'.escape(getline('.'),'\.*[]^$/').'$','bW') |'ld The only

Re: Deleting duplicate lines _without_ sorting

2011-07-07 Thread rameo
Hi Stefan, I found this one a few weeks ago. It does the job without sorting. :g/^/kl \|if search('^'.escape(getline('.'),'\.*[]^$/').'$','bW') \|'ld Regards, Rameo -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying

Re: remove all except pattern

2011-06-20 Thread rameo
this is an example, hello to everybody hello Rameo -- 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

Re: remove all except pattern

2011-06-20 Thread rameo
an empty output (it removes the emails). Regards, Rameo On Jun 20, 6:19 pm, Tim Chase v...@tim.thechases.com wrote: Ah...it looks like it was missing the g flag at the end: :%s/\w\+\W*/\=submatch(0)=~'hello'?submatch(0):''/g Something must not have copied over when I pasted

Re: remove all except pattern

2011-06-20 Thread rameo
but not with p.e. emails: it removes the last character of every email. I tried many things to change the command but I suppose I don't understand enough about vimscript to find the solution. Regards, R. On Jun 20, 7:14 pm, Tim Chase v...@tim.thechases.com wrote: On 06/20/2011 11:35 AM, rameo

remove all except pattern

2011-06-19 Thread rameo
. I don't want to put them on a new line. I checked also the match() function but I haven't found out how to use it. Anyone has an idea how to resolve my problem? Rameo -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying

Re: menu.vim: reference to another menu line command

2011-06-18 Thread rameo
Anyone has an idea how to resolve my question? -- 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

Re: menu.vim: reference to another menu line command

2011-06-18 Thread rameo
I believe that I have found it. it is the C-r/ command let delmatches = ':g/C-r//d C' an 98.002Edit\ Menu.Delete\ Matches\:exe delmatchesCR --- doesn't work (E486 pattern not found: C-r) an 98.002Edit\ Menu.Delete\ Matches\:g/C-r//d CCR --- does work. Any idea? -- You received this

Re: menu.vim: reference to another menu line command

2011-06-18 Thread rameo
Thank you very much. When I read that I had to put the menu command inside the :execute I placed the :exe before delmatches (I thought the menu command was the command in the menu) and not before the whole menu command. -- You received this message from the vim_use maillist. Do not top-post!

Re: Switch Horizontal/Vertical View in Vimdiff

2011-06-17 Thread rameo
-WtC-WK Horizontal Split to Vertical Split: C-WtC-WH Regards, rameo -- 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

menu.vim: reference to another menu line command

2011-06-17 Thread rameo
I can't find out how to refer to another menu line in menu.vim p.e. an95.038 Search\ Menu.Do\ command\ 1\ :a command of 150 characters an98.002 Edit\ Menu.Do\ command\ 2\:my command1 How can I refer to command 1 in command 2 without rewriting the whole commandline of

Re: menu.vim: reference to another menu line command

2011-06-17 Thread rameo
On Jun 17, 9:56 am, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 17/06/11 09:40, rameo wrote: I can't find out how to refer to another menu line in menu.vim p.e. an95.038Search\ Menu.Do\ command\ 1\ :a command of 150 characters an98.002Edit\ Menu.Do\ command

Re: menu.vim: reference to another menu line command

2011-06-17 Thread rameo
On Jun 17, 1:31 pm, Christian Brabandt cbli...@256bit.org wrote: Hi rameo! On Fr, 17 Jun 2011, rameo wrote: This doesn't seem to work (or I did something wrong). p.e. command 1 = :%s/foo/bar/g let command_1 = ':%s/foo/bar/g' an 98.002Edit\ Menu.Do\ command\ 2\:command_1

Re: menu.vim: reference to another menu line command

2011-06-17 Thread rameo
On Jun 17, 2:33 pm, Christian Brabandt cbli...@256bit.org wrote: Hi rameo! On Fr, 17 Jun 2011, rameo wrote: On Jun 17, 1:31 pm, Christian Brabandt cbli...@256bit.org wrote: Hi rameo! On Fr, 17 Jun 2011, rameo wrote: This doesn't seem to work (or I did something wrong). p.e

Re: menu.vim: reference to another menu line command

2011-06-17 Thread rameo
Yes it gives the output what I want (in the commandline) but not the output what I want as it gave before. Can't find the reason. I send you my function also: function! s:CopyMatchesLines(type,kind) let posinit = getpos(.) if a:type == ',' let StartPosition = line(') let

Re: syntax coloring

2011-04-16 Thread rameo
On Apr 15, 10:42 pm, ZyX zyx@gmail.com wrote: Reply to message «Re: syntax coloring», sent 00:32:32 16 April 2011, Saturday by rameo: Is this the correct one? augroup SaveRestoreSessions autocmd! autocmd VimEnter * nested source D:\Session.vim autocmd VimLeave * call ClearArgs

syntax coloring

2011-04-15 Thread rameo
When I start VIM it shows my tabs and reloads my buffers from the last time. I use a session to do this. au VimEnter * exe so d:\\Session.vim au VimLeave * exe 'mksession! d:\\Session.vim' My reopened files do not have syntax coloring. I have to do :e in every file where I need syntax coloring

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 11:17 am, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 15/04/11 09:06, rameo wrote: When I start VIM it shows my tabs and reloads my buffers from the last time. I use a session to do this. au VimEnter * exe so d:\\Session.vim au VimLeave * exe 'mksession! d

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 11:31 am, rameo rai...@gmail.com wrote: On Apr 15, 11:17 am, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 15/04/11 09:06, rameo wrote: When I start VIM it shows my tabs and reloads my buffers from the last time. I use a session to do this. au VimEnter

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 1:43 pm, ZyX zyx@gmail.com wrote: Reply to message «syntax coloring», sent 11:06:33 15 April 2011, Friday by rameo: When I start VIM it shows my tabs and reloads my buffers from the last time. I use a session to do this. au VimEnter * exe so d:\\Session.vim au

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 8:55 pm, ZyX zyx@gmail.com wrote: Reply to message «Re: syntax coloring», sent 21:39:21 15 April 2011, Friday by rameo: Still have a little problem. I had also a VimLeave argdel command in my _vimrc. Is this correct?: augroup SaveRestoreSessions autocmd! autocmd

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 9:14 pm, ZyX zyx@gmail.com wrote: Reply to message «Re: syntax coloring», sent 23:02:40 15 April 2011, Friday by rameo: Tnx.. this is what I added: autocmd VimLeave * if argc() != 0 | 'argdel *' endif Reread help. This is false: you should not use strikes around `argdel

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 9:14 pm, ZyX zyx@gmail.com wrote: Reply to message «Re: syntax coloring», sent 23:02:40 15 April 2011, Friday by rameo: Tnx.. this is what I added: autocmd VimLeave * if argc() != 0 | 'argdel *' endif Reread help. This is false: you should not use strikes around `argdel

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 5:43 pm, ZyX zyx@gmail.com wrote: Reply to message «Re: syntax coloring», sent 19:13:18 15 April 2011, Friday by rameo: Please let me ask you one more question... How do you close this session and reopens a custom one (happens once in a while)? I don't use one continious

Re: syntax coloring

2011-04-15 Thread rameo
On Apr 15, 10:02 pm, ZyX zyx@gmail.com wrote: Reply to message «Re: syntax coloring», sent 23:29:29 15 April 2011, Friday by rameo: I found a new way to integrate argdel: augroup SaveRestoreSessions autocmd! autocmd VimEnter * nested source $VIM\vimfiles\sessions\Session.vim

Re: SID or s: - General questions about functions

2011-04-13 Thread rameo
Thank you very much Tony and ZyX. My functions names do only contains letters, digits and underscores. If I've understood you well, I can now unify all my functions and change s: --- SID change function! --- fun! change endfunction! -- endfun! Is that correct? and can I change also this:

SID or s: - General questions about functions

2011-04-12 Thread rameo
After a half year of use of VIM, I still don't understand what is, and if there is a difference between SID and s:. (even after reading the help file) Can they be exchanged? Fun!, fun!, Function! and function! is the same isn't? Endfunction, endfunction, Endfun, endfun also? I often Titlecase

Re: menu.vim overwritten

2011-04-10 Thread rameo
On Apr 9, 10:54 am, Andy Wokula anw...@yahoo.de wrote: Am 05.04.2011 16:59, schrieb rameo: Actually I use windows gvim 7.3 version. All my files and plugins are in my user directory vimfiles I noted that these 2 files has to be in the vim73 (program directory): - _vimrc - menu.vim

  1   2   3   >