Hi,
my apologies if this question is too silly, or already asked.
In that case, you can just point me to the documentation or example, and I
will keep investigating myself.
I use vim version 6.3.82 on RedHat.
Let's say I have a log file with this format
| : |
For example
...
07 Feb 16:17:38
2011/2/7 AK
> On 02/07/2011 04:12 PM, Jose Caballero wrote:
>
>> Hi,
>>
>> my apologies if this question is too silly, or already asked.
>> In that case, you can just point me to the documentation or example, and
>> I will keep investigating myself.
>
Hi all,
I have been using so far with success this plugin [1], which allowed me to
jump from logs files directly to the source code file and specific line
where a given log message was generated.
However, it worked because the source files where placed in the same
directory where the log files wer
> You could put those directories into the 'path' option, then use
> :find instead of :edit. Once those directories are in 'path',
> though, you could use gF or ^WF to jump to the file name and line
> number under the cursor.
>
Hmmm. Seems like gF or ^WF don't work for me.
I am stuck with vim 6.
Hi,
I am trying to write a function to comment all lines of code in a block.
Note the main purpose for this is to educate myself on vim scripting, given
I am quite new with it. I am sure there are many other solutions to do it,
and much better, but I want to do it in this way to learn.
I have wri
2011/7/22 Ben Schmidt
> Thanks a lot for all your comments!
>> For this particular purpose, the visual way is perfect.
>> However, I am still interested in the regex way, because that will allow
>> me to do
>> other things with the paragraph and not only adding a char at the
>> beginning.
>>
>
>
Hi,
I wanted to thank you guys for the patience, and for all the tips.
I am quite new with Vimscript, so everything is hard to me. But that is the
reason I keep trying, to learn and to educate myself. Sorry for bothering
you guys.
As I said, trying to educate myself with Vimscript, I am still tryi
2011/7/23 Ben Schmidt
> I wanted to thank you guys for the patience, and for all the tips. I
>> am quite new with Vimscript, so everything is hard to me. But that is
>> the reason I keep trying, to learn and to educate myself. Sorry for
>> bothering you guys. As I said, trying to educate myself w
On Jul 23, 2011, at 18:00, Tim Chase wrote:
> On 07/23/2011 12:59 PM, Jose Caballero wrote:
>> 2011/7/23 Ben Schmidt
>>> You don't need to apologies for bothering us. If we didn't enjoy helping
>>> people with Vim, we wouldn't be on this mailing li
Hi,
I was trying to write a small function in vimscript that moves the cursor to
a given line, in order to perform some actions.
I was trying with something like this
function F()
cursor(4,0)
endfunction
but I got and E492 error.
However, with
call cursor(4,0)
everyt
2011/7/24 Taylor Hedberg
> :call is always needed in order to call a function if the function call
> is not otherwise wrapped in some ex command. In other words, it's never
> valid to have a "bare" function call by itself on a line.
>
>
OK.
I need to digest that. I think I should start learning o
1.- to protect it from crashing when I use vim 6.x
>> I guess there has to be something similar to the python sys.version or
>> sys.version_info variables.
>>
>
> :help v:version
>
I already found v:version on the web. I am embedding the whole function into
a
if v:version > 700
endif
> cursor(4,0) is the _value_ of the function. For instance, in a Vim compiled
> with +float, acos(-1) is the arc-cosine (in radians) of minus one, i.e., the
> number pi. All functions return a value (if you execute a :return statement
> without an explicit return value, the function returns the int
> I don't know what you get for ":help call"
>
:help call
call({func}, {arglist} [, {dict}]) *call()* *E699*
Call function {func} with the items in |List| {arglist} as
arguments.
{func} can either be a |Funcref| or the name of
On Jul 24, 2011, at 22:42, Tim Chase wrote:
> On 07/24/2011 09:34 PM, Tony Mechelynck wrote:
>> On 25/07/11 03:41, Jose Caballero wrote:
>>> I don't know what you get for ":help call"
>>
>> Hm, strange.
>
> Is this hitting the diff
Hi,
I would like to know if it is possible to replace 'foo' by 'bar', 'FOO' by
'BAR' and 'Foo' by 'Bar' (or at least the first two), with a single command.
Any link or the right :help command would be enough.
Thanks a lot in advance,
Jose
--
You received this message from the "vim_use" maill
Hi,
this happened to me today. I had a line like this one
===
and I wanted to replace all characters by '-', so I could have something
like
I thought I could do it by combining 'g' and 'r' as I understood 'g' is
good to repeat the same command over all chars i
Thanks a lot everyone for your comments and tips.
Jose
--
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
Hi,
for our current python project, we are trying to follow the PEP
recommendations, and therefore keeping all indentations to 4 white spaces.
However, when I am writing code, I feel more comfortable with 8 white
spaces.
I am pretty sure there must be a trick to put on .vimrc (or similar) in
such
> that trigger on BufWritePre and BufWritePost, something like (untested)
>
> autocmd BufWritePre *.py %s/^\( \{8}\)\+/\=substitute(**submatch(0),
> repeat(' ', 8), repeat(' ', 4), 'g')
>
> autocmd BufWritePost *.py %s/^\( \{4}\)\+/\=substitute(submatch(0),
> repeat(' ', 4), repeat(' ', 8), 'g')
Hi,
this is my first post in this list, so I wanted to introduce myself and say
hello to everyone here.
I have a very basic question, as a beginner I am using vi.
I use vim 6.3.82, on Red Hat. I have no root privileges.
Right now I have all my mappings and abbreviations and those things in a
sin
2010/5/24 Gary Johnson
> On 2010-05-24, Jose Caballero wrote:
> > Hi,
> >
> > this is my first post in this list, so I wanted to introduce myself and
> say
> > hello to everyone here.
> >
> > I have a very basic question, as a beginner I am using vi.
&
Hi everyone,
I use VIM 6.3 (I cannot update it) on Red Hat.
I have a set of abbreviations defined in my .vimrc file that allows me to
type very fast.
However, when I copy&paste some text using the mouse, if some string inside
the new text matches any of my defined abbreviations, it is also expand
>
> > I have a set of abbreviations defined in my .vimrc file that allows me to
> > type very fast.
> > However, when I copy&paste some text using the mouse, if some string
> inside
> > the new text matches any of my defined abbreviations, it is also expanded
> > automatically.
> > But when I copy
Hi,
this is actually a more generic question, but we can use the Toggle plugin
as example.
I apologize in advance if it is a very simple question, or already asked
many times.
I have found this plugin called Toogle:
http://www.vim.org/scripts/script.php?script_id=895
I have modified it to allow
Hi,
I have been trying to find in google how to join all lines in a given
paragraph, or a range to lines.
I only found this
:set tw=100
gggqJ
or similar recipes.
But that joins all lines in the file.I would be interested only in a
portion of the file. How should I modify that recipe for that
>>
>> I have been trying to find in google how to join all lines in a given
>> paragraph, or a range to lines.
>
>
> You could use visual mode: vipJ
>
That was so simple I now feel embarrassed.
Thanks a lot!
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type yo
Hello,
I am pretty sure this question has been already asked many times. I
apologize if that is the case.
I have been googling the topic for a while, and the problem is that I
found too many different ways to [theoretically] do it, so I am not
sure which one is the right one.
So let's say I only
>>
>> au BufRead,BufNewFile *.myfile setfiletype myfile
>
> It would be better, i.e., more likely to work as you expect, if you
> instead put this line in ~/.vim/filetype.vim
>> ~/.vim/plugin/syntax/myfile.vim, with content
>>
>> if exists("b:current_syntax")
>> finish
>> e
2015-11-11 4:25 GMT-05:00 John Beckett :
> Jose Caballero wrote:
>> Now I only need to figure out how to highlight comments.
>
> I'm not sure if that point is covered, but try:
> http://vim.wikia.com/wiki/Creating_your_own_syntax_files
>
> John
>
Thanks. Writing
Hi,
I sent the question "write a very basic syntax file" yesterday to this forum.
Thanks to the help provided I managed to write it.
But I have a couple of related questions.
(1) I was suggested to search for the inline help
:help new-filetype
Howeve
Hello,
I have the feeling I asked this same question about a year ago. If
that is the case, then I truly apologize. I know, and understand, that
asking twice the same thing in a mailing list is close to a deadly
sin.
Is it possible to highlight an entire paragraph based on a single line content?
>>
>>
>> Is it possible to highlight an entire paragraph based on a single line
>> content?
>> I would be interested in changing the color of an entire block of
>> configuration lines if one of those lines in the block is "enabled =
>> False", for example.
>>
>> I am so new to this (*) that
>
> " Need average length of such enabled section in place of 50
> syntax sync minlines=50
> syntax match PreProc /\%(\%^\|^$\n\)\@2<=\%(.\+\n\)*enabled =
> False\n\%(.\+\%(\n\|\%$\)\)*\%(\n\|\%$\)\@1=/
>
I have just started playing with it
E59: invalid character after \@
E475: Invali
2016-04-17 13:46 GMT-04:00 Nikolay Aleksandrovich Pavlov :
> 2016-04-17 20:19 GMT+03:00 Jose Caballero :
>>>
>>> " Need average length of such enabled section in place of 50
>>> syntax sync minlines=50
>>> syntax match PreProc /\%(\%^\
Hi,
first, I sincerely apologize for asking in this forum a question that
I believe is trivial for most members in the list.
However, I think you will understand why I am asking it here.
I am regular VIM user, even though I only know around 1% of the user's features.
But that is fine, since I kn
I reply to myself so I don't pick any particular answer.
Thanks a lot for your comments. I will have a look to those books. I
have SAFARI account, so I can check them for free :)
As I said, I am not that much concerned about learning editing
features, or things I can do "with my fingers" when editi
2017-08-11 15:27 GMT-04:00 Nikolay Aleksandrovich Pavlov :
> 2017-08-11 21:36 GMT+03:00 Jose Caballero :
>> I reply to myself so I don't pick any particular answer.
>> Thanks a lot for your comments. I will have a look to those books. I
>> have SAFARI account, so I can ch
Hi,
I am working on a host that didn't have ctags installed. I have just
installed it.
However, I think I am missing some step.
After creating the tags file, opening a file with VIM and hitting
CTRL+] on a string, it does not jump to the file with the definition.
It just gives me a comment like
Thanks Ben and Erik.
Both tags files are identical:
host1 $ md5sum tags
34e5413f4dea1c0644b35de7808a8029 tags
host2 $ mad5sum tags
34e5413f4dea1c0644b35de7808a8029 tags
Also tags are equal:
:set tags?
tags=./tags,./TAGS,tags,TAGS
But, when hitting CTRL+] on top of a
2017-08-15 17:44 GMT-04:00 Benji Fisher :
> On Tue, Aug 15, 2017 at 4:42 PM, Jose Caballero
> wrote:
>>
>> Thanks Ben and Erik.
>>
>> Both tags files are identical:
>>
>> host1 $ md5sum tags
>> 34e5413f4dea1c0644b35
2017-08-17 14:51 GMT-04:00 Gary Johnson :
> On 2017-08-17, Jose Caballero wrote:
>
>> In both cases, after trying a tag, :ts gives me the same, similar to
>>
>># pri kind tag file
>> 1 F C iStatusInterface plugins/status/Plugin
2017-08-17 16:15 GMT-04:00 Nikolay Aleksandrovich Pavlov :
> 2017-08-17 22:04 GMT+03:00 Jose Caballero :
>> 2017-08-17 14:51 GMT-04:00 Gary Johnson :
>>> On 2017-08-17, Jose Caballero wrote:
>>>
>>>> In both cases, after trying a tag, :ts gives me the same,
Hi,
I am asking here because I am not sure myself how to google it.
I tried with something similar to the subject of this email, but no
luck. That, or I didn't actually understand what I found.
Let's say, and this is not my real need but a very clear example, I
want to write an abbreviation that
Hi,
As this is my first time I try to write a vimscript function that uses
regular expressions, I am a little bit of lost. Not sure which
built-in function is the most proper, and/or how to use it.
Let's say I have this line (very familiar for python developers):
def __init__(self, x, y, z):
Hi,
I trying to modify an plugin that I already have in such a way that,
after adding the lines it already does and moving the cursor to a
given position, now it also adds the name of the file in that
position.
I know how to get the name of the file in a variable.
But what is the function I need
2017-09-06 9:11 GMT-05:00 Gary Johnson :
> On 2017-09-06, Jose Caballero wrote:
>
>> I trying to modify an plugin that I already have in such a way that,
>> after adding the lines it already does and moving the cursor to a
>> given position, now it also adds the
I have searched on google using the same words as the subject, but
didn't get too much information. Or didn't understand what I found.
Maybe people in this list can provide for hints on how to google it
more precisely.
So this is what I would like to be able to do.
When editing python code, I wou
Hi,
I would only need to know which key words I need to search in google... :)
I have a few remaps (and iremaps) that modify the current line. For
example, to add # at the beginning, and stuff like that.
I would like to know how to re-use those mappings for a block of
lines, not line by line.
I am
2017-10-20 23:36 GMT-04:00 Tony Mechelynck :
> On Sat, Oct 21, 2017 at 4:25 AM, Ben Fritz wrote:
>> On Friday, October 20, 2017 at 5:29:53 PM UTC-5, Jose Caballero wrote:
>>> Hi,
>>>
>>> I would only need to know which key words I need to search in googl
Hello,
if I want to write a function that does something after every line
matching a given pattern (for example, for every python method
definition), what does the community prefer to handle it?
Just iteratively?
Or with a recursive function where the range changes from call to call?
I am just wo
2017-10-26 20:24 GMT-04:00 Tim Chase :
> On 2017-10-26 19:13, Jose Caballero wrote:
>> if I want to write a function that does something after every line
>> matching a given pattern (for example, for every python method
>> definition), what does the community prefer
Hi,
I didn't really know how to express it better, so I picked that
meaningless subject. Sorry about that.
Let's say, as a mental experiment, we want to write plugins -or
whatever is needed- to enhance the experience of editing a given kind
of configuration file, with a well defined extension.
T
>
>
>
> Or, why do you want this?
Just trying to learn new things that could eventually improve performance,
while I have some fun during the process.
Thanks a lot for your comments and pointers.
Cheers,
Jose
--
--
You received this message from the "vim_use" maillist.
Do not top-post!
Hi,
this is a quick question about how to modify my .vimrc and all my
plugins so I can copy all of them to different hosts (under different
usernames) and still work.
I have all of them (vimrc and all plugin directories) in a github account.
So my intention is, when I login to a remote host -eith
Hello,
I have this function [*].
It is meant to create a line when opening a new file with extension
.pan, where that line is based on the path of the file.
That code works on my personal computer, with VIM 9.0.1023
However, it fails on the computer at work where it has to run, with VIM 7.4.629
I
Indeed it works !!
Thanks a lot.
Cheers,
Jose
El lun, 13 mar 2023 a las 14:06, Christian Brabandt
() escribió:
>
>
> On Mo, 13 Mär 2023, Jose Caballero wrote:
>
> > Hello,
> >
> > I have this function [*].
> > It is meant to create a line when opening a new
Hi,
apologies if this is a silly question.
I am trying to write documentation for my plugins in the
~/.vim/ftplugin/foo/ directory.
This is what I have tried:
1) created ~/.vim/ftplugin/foo/doc/
2) created file ~/.vim/ftplugin/foo/doc/testfoo.txt with content
*testfoo* this is a test
3) :help
El sáb, 10 jun 2023 a las 18:51, Gary Johnson ()
escribió:
> On 2023-06-10, Jose Caballero wrote:
> > Hi,
> > apologies if this is a silly question.
> >
> >
> > I am trying to write documentation for my plugins in the
> ~/.vim/ftplugin/foo/
> > directory
that may be it.
Thanks a lot.
Jose
El dom, 11 jun 2023 a las 17:37, Gary Johnson ()
escribió:
> On 2023-06-10, Jose Caballero wrote:
> >
> > El sáb, 10 jun 2023 a las 18:51, Gary Johnson escribió:
> >
> > On 2023-06-10, Jose Caballero wrote:
> > >
Indeed, this worked:
:set runtimepath=~/.vim/ftplugin/foo,$VIMRUNTIME
I assume I can add it to .vimrc, so I don't need to do it every time.
Thanks a lot for your help !!!
Cheers,
Jose
El dom, 11 jun 2023 a las 17:37, Gary Johnson ()
escribió:
> On 2023-06-10, Jose Caballe
I think using ~/.vim/doc/ is cleaner than ~/.vim/ftplugin/foo/doc
Thanks a lot for all your help.
Cheers,
Jose
El lun, 12 jun 2023 a las 21:18, Bram Moolenaar ()
escribió:
>
> > Indeed, this worked:
> >
> > :set runtimepath=~/.vim/ftplugin/foo,$VIMRUNTIME
> >
> > I assume I can add it to .
Hello,
I am just curious about it. I have just been experimenting with it, and it
is possible to send the selected range of lines, or even the entire buffer,
to an external script. Right? In my case, in python.
I find python, or even bash, to be more readable and friendly than
vimscript.
What wou
have a good point: "your favourite language might not
be my favourite language"
Cheers,
Jose
El dom, 28 abr 2024 a las 20:44, Tony Mechelynck (<
antoine.mechely...@gmail.com>) escribió:
> On Sun, Apr 28, 2024 at 9:27 PM Jose Caballero
> wrote:
> >
> > Hello,
&g
Thanks a lot everybody for the comments. Very helpful.
Cheers
Jose
El dom, 28 abr 2024 a las 19:51, Jose Caballero ()
escribió:
> Hello,
>
> I am just curious about it. I have just been experimenting with it, and it
> is possible to send the selected range of lines, or even the e
65 matches
Mail list logo