Re: how to apply a given map, written for a line, to a block of lines?

2017-10-20 Thread 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 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 wondering if there is a way, for example, to apply it to a
>> visually select block, or similar.
>>
>> Any clue, or link, where I can educate myself on this topic, would be
>> appreciated.
>> As I said, at this point, I don't even know which key to search with :help
>>
>> Thanks a lot in advance.
>> Jose
>
> Easy way (no extra effort): visually select the lines you want, and type 
> ":normal " and then your mapping. You should see ":'<,'>normal ". Press enter 
> to run the command on every line.
>
> Harder way would be to create a visual mode mapping that somehow invokes the 
> behavior you want on each line. Then for bonus points consider an 
> operator-pending mapping.

Yeah, and for extra bonus points: construct a function with a "range"
qualifier (see :help :function and :help E124) and/or a user-command
with a -range attribute, probably defaulting to current line (see
:help :command and :help :command-range) and update your mapping to
invoke them. If you define both in a single script (e.g. in your vimrc
or in an ftplugin), it is possible to define a public (i.e.
user-facing) command which calls a private (i.e. script-local)
function.

Best regards,
Tony.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to apply a given map, written for a line, to a block of lines?

2017-10-20 Thread Ben Fritz
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 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 wondering if there is a way, for example, to apply it to a
> visually select block, or similar.
> 
> Any clue, or link, where I can educate myself on this topic, would be
> appreciated.
> As I said, at this point, I don't even know which key to search with :help
> 
> Thanks a lot in advance.
> Jose

Easy way (no extra effort): visually select the lines you want, and type 
":normal " and then your mapping. You should see ":'<,'>normal ". Press enter 
to run the command on every line.

Harder way would be to create a visual mode mapping that somehow invokes the 
behavior you want on each line. Then for bonus points consider an 
operator-pending mapping.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Directing which window is changed with :copen

2017-10-20 Thread Tim Chase
On 2017-10-20 21:04, Tim Chase wrote:
> Long a nagging annoyance, I figured it's time to ask.  I frequently
> will do a :vimgrep on a term under the cursor, but want the
> resulting navigation to open in a new window.

Digging a little further, it's not quite as capricious/malicious as
I'd thought.  The help does state that it will open in the window
immediately above the quickfix window. It just usually happens that
the window I want to preserve is in that position at the bottom of
my window-stack.  I did also encounter ^W_ which seems to solve
most of my problems. Though it would be nice to be able to choose
which window the default  tromped.

-tim



-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Directing which window is changed with :copen

2017-10-20 Thread Ben Fritz
On Friday, October 20, 2017 at 9:04:29 PM UTC-5, Tim Chase wrote:
> Long a nagging annoyance, I figured it's time to ask.  I frequently
> will do a :vimgrep on a term under the cursor, but want the resulting
> navigation to open in a new window.
> 
>   $ vim somefile.c
>   :echo 'In my main code window'
>   :new
>   :echo 'I want my vimgrep results HERE'
>   :vimgrep /pattern/ *.[ch]
>   :copen
> 
> Navigating to my desired entry in the quickfix list and hitting Enter
> on the desired line ends up navigating in my original "main code"
> window, not in the window I ":copen"ed.
> 
> 1)  how to I know which window the Enter will impact?  Vim seems to
> have an uncanny ability to choose the one I *least* want to change.
> 
> 2)  how can I tell Vim which window I want the resulting quick-fix
> "Enter" navigation to go into?
> 
> Thanks,

Do :copen, then put the cursor in the window you want, then jump directly to 
the quickfix window (e.g. with CTRL-W_b). After that the correct window should 
be used.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Directing which window is changed with :copen

2017-10-20 Thread Tim Chase
Long a nagging annoyance, I figured it's time to ask.  I frequently
will do a :vimgrep on a term under the cursor, but want the resulting
navigation to open in a new window.

  $ vim somefile.c
  :echo 'In my main code window'
  :new
  :echo 'I want my vimgrep results HERE'
  :vimgrep /pattern/ *.[ch]
  :copen

Navigating to my desired entry in the quickfix list and hitting Enter
on the desired line ends up navigating in my original "main code"
window, not in the window I ":copen"ed.

1)  how to I know which window the Enter will impact?  Vim seems to
have an uncanny ability to choose the one I *least* want to change.

2)  how can I tell Vim which window I want the resulting quick-fix
"Enter" navigation to go into?

Thanks,

-tim



-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Persian (aka Farsi) Vim

2017-10-20 Thread Tony Mechelynck
On Fri, Oct 20, 2017 at 10:56 PM, Hamidreza Jafari
 wrote:
> Hello,
>
> I can prepare vim to type right-to-left and change keyboard to Persian but 
> there are some glitches with the font. Some letters that are specific to 
> Persian are used in Arabic form. That's why I think it is picking up the 
> Arabic font instead of the Persian. How can I fix that?
>
> I am using GVim in Kubuntu for the moment.

Try selecting a specific Persian font face, as opposed to an Arabic
one or a generic Unicode font (which will usually display Arabic
styles of letters from the Arabic family of abjads, including Persian,
urdu, etc.).

See
http://vim.wikia.com/wiki/Setting_the_font_in_the_GUI
:help 'guifont'

The arabeyes project, mentioned in the arabic.txt helpfile, may (or
may not) have an abjad style that suits you. Have a look at it, you
know your needs better than I do.

Note that the fixed-width letter requirement of Vim is really
ill-suited to a highly cursive script like the Arabic-family abjads.
As long as each letter is recognizable, I'd regard the rest as icing
on the cake. When you display your text in a GUI which knows about
proportional fonts, for instance when you display your arabic HTML
pages, created with Vim, in a web browser, the result should be much
prettier than in Vim.

Also, Vim (and gvim) can display a window of text either LTR or RTL,
and even a single file LTR in one window and RTL in a different window
but not both in a single window depending on which script is used
where in the text. If you want to mix Persian with some Latin script
in a single text, you may get better results by running Vim in console
mode in an mlterm terminal, where the terminal, and not Vim, takes
care of arranging the text LTR or RTL on the screen: see :help
'termbidi'


Best regards,
Tony.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Persian (aka Farsi) Vim

2017-10-20 Thread Hamidreza Jafari
Hello,

I can prepare vim to type right-to-left and change keyboard to Persian but 
there are some glitches with the font. Some letters that are specific to 
Persian are used in Arabic form. That's why I think it is picking up the Arabic 
font instead of the Persian. How can I fix that?

I am using GVim in Kubuntu for the moment.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to apply a given map, written for a line, to a block of lines?

2017-10-20 Thread Jose Caballero
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 wondering if there is a way, for example, to apply it to a
visually select block, or similar.

Any clue, or link, where I can educate myself on this topic, would be
appreciated.
As I said, at this point, I don't even know which key to search with :help

Thanks a lot in advance.
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread Charles Campbell
Felipe Vieira wrote:
> Hi everyone,
>
> I've been trying to develop a plugin and I'm used to writing testing for the
> softwares I develop. The problem is that I cannot find a suitable testing
> platform for vim plugins. This makes me feel uncomfortable in pushing
> improvements made on my own fork of a bigger project (this may adversely 
> impact
> hundreds of users, and I think the codebase is complex enough; tests would
> force some adherence to what is already coded and improve the plugin itself).
>
> I have tried a couple of other vim plugins for testing with little/no success.
> 
Have you tried pchk?  (http://www.drchip.org/astronaut/vim/index.html#PCHK)

The idea: create a file with a number of commands.

 * Run :PChkTry and fix your plugin until you have it working.  (your
plugin will be running in a separate vim window)
 * Run :PChkMake  -- this will, at every PChkSnapshot, take a hash of
the display of the remote vim window's contents and save it (along with
some geometry information, such as qty of windows, size of windows, etc)
 * In the future: use :PChk  -- that will compare the current plugin
performance with that of its previous performance (ie. if the hash is
the same, pretty much the display has not changed)

An excerpt from its help:

*PChkTry* *PChkMake* *PChk* *PChkStep*
Start a test by editing it, then run one of the following four commands:

:PChkTry  : try the test.  Will stop at :PChkSnapshot lines
:PChkMake  : make an Expected/tst###.out file
:PChk  : compare snapshot hashes currently obtained
with previously obtained expected test results
:PChkStep  : step through each line of a test, not just at
  :PChkSnapshots.


Test File Commands *PChkSnapshot* *PChkFeedkeys* *PChkPause*

:PChkSnapshot  : runs a hashing algorithm over the remote display.
Result is saved in/compared with Expected/tst###.out
:PChkFeedkeys ... : send keys to server.  ^X transla  
*PChkTry* *PChkMake* *PChk* *PChkStep*
Start a test by editing it, then run one of the following four commands:

:PChkTry  : try the test.  Will stop at :PChkSnapshot lines
:PChkMake  : make an Expected/tst###.out file
:PChk  : compare snapshot hashes currently obtained
with previously obtained expected test results
:PChkStep  : step through each line of a test, not just at
  :PChkSnapshots.


Test File Commands *PChkSnapshot* *PChkFeedkeys* *PChkPause*

:PChkSnapshot  : runs a hashing algorithm over the remote display.
Result is saved in/compared with Expected/tst###.out
:PChkFeedkeys ... : send keys to server.  ^X translates to control
characters (ie. ^M is a ENTER)
:PChkPause  : pause the test (uses |input()|).  One may
*  =continue
* c=check
* s=step
* t=try
:..cmd  : send cmd to server to execute..
^\s*#...  : echomsg comment in client vim (will not be sent
to server)
..cmd..  : send cmd to server to execute as a normal command
*..reply..  : netrw issues prompt; reply to it with this string
tes to control
characters (ie. ^M is a ENTER)
:PChkPause  : pause the test (uses |input()|).  One may
*  =continue
* c=check
* s=step
* t=try
:..cmd  : send cmd to server to execute..
^\s*#...  : echomsg comment in client vim (will not be sent
to server)
..cmd..  : send cmd to server to execute as a normal command
*..reply..  : netrw issues prompt; reply to it with this string


An example of a test file (for netrw):  (in a file called tst003)

# Make a file: %  (called TmpFile)
# Delete the file
:let g:netrw_pchk= 1
:cd dir001
:e .
:PChkSnapshot
%
*TmpFile
:call setline(1,"testing")
:PChkSnapshot
:w
:e .
:PChkSnapshot
:call search("TmpFile","wc")
:PChkSnapshot
D
*y
:PChkSnapshot

The :... commands are vim commands.  Without a ":" are vim normal-mode
commands/maps.

Hope that helps,
Chip Campbell

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread Marcin Szamotulski
On 10:10 Fri 20 Oct , Luc Hermitte wrote:
> Hi,
> 
> > However my concerns are broader as I'm trying to figure out ways of
> > having a
> > vim project maintained by different people but enforcing that their
> > coding
> > standards/modifications adhere to a test framework.
> 
> So, you're not looking for unit testing as there exists quite a few projects, 
> but for linters it seems like vint 
> https://github.com/Kuniwak/vint
> 
> I've even seen an external tool for github (1) that automatically tries to 
> execute the linter on code pushed -- alas I can't remember the name, or did 
> it stop supporting vim, I can't tell.
> 
> Anyway, I usually just unit-test my plugin with a mixture of my vim-UT (1) 
> and of vimrunner (3) that I've even registered in travis-ci which gives me 
> little nice badges (4).
> 
> (1) https://github.com/marketplace
> (2) https://github.com/LucHermitte/vim-UT/
> (3) https://github.com/LucHermitte/vim-UT/blob/master/doc/rspec-integration.md
> (4) https://github.com/LucHermitte/lh-vim-lib#lh-vim-lib-v400---
> 
> -- 
> Luc Hermitte

Nice work, thanks for the links.

Best regards,
Marcin

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature


Re: markdown 4 backticks fenced code blocks

2017-10-20 Thread BPJ
> fre 20 okt. 2017 kl. 11:44 skrev David Demelier
>Hello,

> In vim, all my markdown files used 4 backticks () to delimitate
fenced code blocks. It does not renders correctly in vim because it looks
like vim's markdown syntax only supports 3 backticks (which is valid in
most markdown extensions too).

Use vim-pandoc and vim-pandoc-syntax. They are much better even if you
don't use Pandoc (yet :-) and they are actively maintained.



-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: markdown 4 backticks fenced code blocks

2017-10-20 Thread Christian Brabandt

On Fr, 20 Okt 2017, David Demelier wrote:

> Hello,
> 
> In vim, all my markdown files used 4 backticks () to delimitate fenced 
> code blocks. It does not renders correctly in vim because it looks like vim's 
> markdown syntax only supports 3 backticks (which is valid in most markdown 
> extensions too).
> 
> I wonder if it's possible to update the markdown syntax to support both 3 and 
> 4 backticks as fenced code blocks.
> 
> I think the line 88 of syntax/markdown.vim
> 
> syn·region·markdownCode·matchgroup=markdownCodeDelimiter·start="^\s*```.*$"·end="^\s*```\ze\s*$"·keepend
>  
> 
> could be updated like this:
> 
> syn·region·markdownCode·matchgroup=markdownCodeDelimiter·start="^\s*?.*$"·end="^\s*```\ze\s*$"·keepend
> 
> But I'm not an expert,

Please contact the maintainer of the plugin and discuss this issue with 
him.

Christian
-- 
Die Leute sind gar nicht so dumm, wie wir sie durchs Fernsehen noch
machen werden.
-- Hans Joachim Kulenkampff

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread tyru
2017/10/20 16:29 "lith" :

> I have tried a couple of other vim plugins for testing with little/no
success.

Which one did you try? Are you looking for something like vader <
https://github.com/junegunn/vader.vim>?


Or if you want a full stack one, themis.vim is also the thing.
https://github.com/thinca/vim-themis


Regards

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


markdown 4 backticks fenced code blocks

2017-10-20 Thread David Demelier
Hello,

In vim, all my markdown files used 4 backticks () to delimitate fenced code 
blocks. It does not renders correctly in vim because it looks like vim's 
markdown syntax only supports 3 backticks (which is valid in most markdown 
extensions too).

I wonder if it's possible to update the markdown syntax to support both 3 and 4 
backticks as fenced code blocks.

I think the line 88 of syntax/markdown.vim

syn·region·markdownCode·matchgroup=markdownCodeDelimiter·start="^\s*```.*$"·end="^\s*```\ze\s*$"·keepend
 

could be updated like this:

syn·region·markdownCode·matchgroup=markdownCodeDelimiter·start="^\s*?.*$"·end="^\s*```\ze\s*$"·keepend

But I'm not an expert,

What do you think?

-- 
David

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread Luc Hermitte
Hi,

> However my concerns are broader as I'm trying to figure out ways of
> having a
> vim project maintained by different people but enforcing that their
> coding
> standards/modifications adhere to a test framework.

So, you're not looking for unit testing as there exists quite a few projects, 
but for linters it seems like vint 
https://github.com/Kuniwak/vint

I've even seen an external tool for github (1) that automatically tries to 
execute the linter on code pushed -- alas I can't remember the name, or did it 
stop supporting vim, I can't tell.

Anyway, I usually just unit-test my plugin with a mixture of my vim-UT (1) and 
of vimrunner (3) that I've even registered in travis-ci which gives me little 
nice badges (4).

(1) https://github.com/marketplace
(2) https://github.com/LucHermitte/vim-UT/
(3) https://github.com/LucHermitte/vim-UT/blob/master/doc/rspec-integration.md
(4) https://github.com/LucHermitte/lh-vim-lib#lh-vim-lib-v400---

-- 
Luc Hermitte

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread lith
> I have tried a couple of other vim plugins for testing with little/no success.

Which one did you try? Are you looking for something like vader 
?

Regards

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Advice needed: best practices for vim plugin testing

2017-10-20 Thread Marcin Szamotulski
On 23:49 Thu 19 Oct , Felipe M. Vieira wrote:
> On Thu, October 19, 2017 at 23:36, Marcin Szamotulski wrote:
> > On 11:10 Thu 19 Oct , Felipe Vieira wrote:
> > > Hi everyone,
> > >
> > > I've been trying to develop a plugin and I'm used to writing testing for 
> > > the
> > > softwares I develop. The problem is that I cannot find a suitable testing
> > > platform for vim plugins. This makes me feel uncomfortable in pushing
> > > improvements made on my own fork of a bigger project (this may adversely 
> > > impact
> > > hundreds of users, and I think the codebase is complex enough; tests would
> > > force some adherence to what is already coded and improve the plugin 
> > > itself).
> > >
> > > I have tried a couple of other vim plugins for testing with little/no 
> > > success.
> > >
> > > **What currently is the best practice for developing vim plugins?**
> > > (preferably an official vim testing platform for plugins)
> > >
> > > It is needless to say how important is to develop tests for software 
> > > (this is
> > > beyond the point here).
> > >
> > > I don't thinks this information is very relevant but:
> > >
> > > * I have some experience with vimscript
> > > * I program in python most of the time
> > > * The plugin is: https://github.com/python-mode/python-mode (my own fork:
> > >   https://github.com/fmv1992/python-mode)
> > > * I am willing to learn whatever it takes to be able to develop testing 
> > > for my
> > >   plugin (as long as it is something 'official/stable')
> > >
> > > Best,
> > >
> > > Felipe.
> >
> > Hi Felipe,
> >
> > I've been missing a testing suite for vim too.  One possible solution is
> > to use the same technique that vim is using itself to test the code.
> > There are now bunch of assert functions (:h assert_equal(), etc.).
> >
> > Another thing that would be awesome is to have a PureScript backend
> > for VimL and develop vim plugins in a strongly typed language.  That would
> > rule out a lot of bugs.  There is Python backend for Purescript which
> > one could use to write plugins that are using vim python interface.
> >
> > Cheers,
> > Marcin
> 
> Marcin,
> 
> thanks for the tips.
> 
> I was aware of the 'assert_' family. They are useful if someone is checking
> function correctness and the like.
> 
> However my concerns are broader as I'm trying to figure out ways of having a
> vim project maintained by different people but enforcing that their coding
> standards/modifications adhere to a test framework.
> 
> As such I was thinking of ways of vim syntax checking (if proposed git/github
> modifications were syntactically correct) and their results as well (for
> instance having a vim command issued like 'PythonEnfoceCodingStandard' and be
> sure that a test buffer changed).
> 
> And to be 100% honest I don't know exactly what I want. That's why I do know
> that there is a gap/need to contribute to vim in this point but I don't think 
> I
> have enough practice with coding to tackle this issue myself.
> 
> I'll let everyone know if I stumble upon something useful. Meanwhile lets hope
> others contribute to this post.
> 
> Best,

For testing syntax one could use `synstack()` and `synIDaddr()` to test
if the file has the right syntax groups.

Best regards,
Marcin

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Digital signature