Re: tracking text
> > Basically i am trying to track all the new text > > i'm adding to a file. > > Great! By the way, I searched the vim.org scripts for "signs" and came > up with a few plugins that might already do what you're looking for In case the files are under a vcs (git, svn, hg), I'd like to add quickfixsigns (http://www.vim.org/scripts/script.php?script_id=2584) to the list. The OP could also be interested in the SaveSigns plugin ( http://www.vim.org/scripts/script.php?script_id=2992) that lets users save signs. Regards, Tom -- 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: tracking text
On Jan 26, 11:03 pm, sinbad wrote: > > Wow, vim never ceases to amaze me. > Signs are exactly what i need. > Ben, thanks for letting me know about signs. > Basically i am trying to track all the new text > i'm adding to a file. > Great! By the way, I searched the vim.org scripts for "signs" and came up with a few plugins that might already do what you're looking for (I have no idea how good any of these are, and obviously may have missed some): http://www.vim.org/scripts/script.php?script_id=1881 http://www.vim.org/scripts/script.php?script_id=3052 http://www.vim.org/scripts/script.php?script_id=2496 http://www.vim.org/scripts/script.php?script_id=2148 http://www.vim.org/scripts/script.php?script_id=2712 -- 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: tracking text
On Jan 26, 8:40 pm, Ben Fritz wrote: > On Jan 26, 1:46 am, sinbad wrote: > > > > > > > > > > > On Jan 26, 12:33 pm, Paul Isambert wrote: > > > > sinbad a écrit: > > > > Aren't marks good enough? Mark the line containing "jack", and then use > > > the mark, or if you want the line number use line("'x"), where "x" is > > > your mark. Vim will keep track of it better than any hack. > > > > If marks are unknown to you, try ":help bookmark". > > > > Best, > > > Paul > > > marks are limited, the number of locations i want to track will always > > exceed 26, so i had to use getpos(), setpos(). > > You're not really working simultaneously on over 26 different > positions in the same buffer, right? What are you actually trying to > accomplish here? Maybe there is a better way. > > I think signs (see :help signs) automatically adjust similarly to > marks, and those are not limited, but they serve a slightly different > purpose. Wow, vim never ceases to amaze me. Signs are exactly what i need. Ben, thanks for letting me know about signs. Basically i am trying to track all the new text i'm adding to a file. cheers sinbad -- 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: tracking text
On Jan 26, 1:46 am, sinbad wrote: > On Jan 26, 12:33 pm, Paul Isambert wrote: > > > sinbad a écrit: > > > Aren't marks good enough? Mark the line containing "jack", and then use > > the mark, or if you want the line number use line("'x"), where "x" is > > your mark. Vim will keep track of it better than any hack. > > > If marks are unknown to you, try ":help bookmark". > > > Best, > > Paul > > marks are limited, the number of locations i want to track will always > exceed 26, so i had to use getpos(), setpos(). > You're not really working simultaneously on over 26 different positions in the same buffer, right? What are you actually trying to accomplish here? Maybe there is a better way. I think signs (see :help signs) automatically adjust similarly to marks, and those are not limited, but they serve a slightly different purpose. -- 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: tracking text
On Jan 26, 12:33 pm, Paul Isambert wrote: > sinbad a écrit: > > > Aren't marks good enough? Mark the line containing "jack", and then use > the mark, or if you want the line number use line("'x"), where "x" is > your mark. Vim will keep track of it better than any hack. > > If marks are unknown to you, try ":help bookmark". > > Best, > Paul marks are limited, the number of locations i want to track will always exceed 26, so i had to use getpos(), setpos(). thanks sinbad -- 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: tracking text
sinbad a écrit: > > hi, > > i want to track text in a file. an example file as below. > > > simple > jack > --- > > now i want to track the text "jack", so i remember it's > position in the file. Now content can be added in the > file anywhere, if new content is added to file after "jack" > there is no problem, but if it is added before "jack", i've > to update the stored position for "jack". > > so now the question is how do i keep track of how many > lines are added, deleted etc, is there any au command > to do this. the catch here is i want to update the postion > "jack" once the text is entered, not necessarily after > doing :w Aren't marks good enough? Mark the line containing "jack", and then use the mark, or if you want the line number use line("'x"), where "x" is your mark. Vim will keep track of it better than any hack. If marks are unknown to you, try ":help bookmark". Best, Paul -- 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
tracking text
hi, i want to track text in a file. an example file as below. simple jack --- now i want to track the text "jack", so i remember it's position in the file. Now content can be added in the file anywhere, if new content is added to file after "jack" there is no problem, but if it is added before "jack", i've to update the stored position for "jack". so now the question is how do i keep track of how many lines are added, deleted etc, is there any au command to do this. the catch here is i want to update the postion "jack" once the text is entered, not necessarily after doing :w can you guys point me in the right direction to do this. cheers sinbad -- 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