txtfmt not starting the prompt on \i

45 views
Skip to first unread message

ankur

unread,
Jun 18, 2013, 3:16:03 AM6/18/13
to v...@vim.org
Hello,

I have extracted the tar file for txtfmt and then open a new file with vim.
Then I tried following commands:
:set ft=txtfmt
:let maplocalleader = "-"
:map -\ \DoItNow

Now I was hoping to get the pompt after typing -\i (in the normal mode) to
allow me change the color etc. But typing -\i or \i gets me into the Insert
mode of vim. The :MakeTestPage command is showing me different colors and
formats, (but I couldn't do the same in a new file or the scratch space
opened with MakeTestPage).

Can someone recommend me steps to activate the prompt using <LocalLeader>.

Ankur



--
View this message in context: http://vim.1045645.n5.nabble.com/txtfmt-not-starting-the-prompt-on-i-tp5716065.html
Sent from the Vim - General mailing list archive at Nabble.com.

Ben Fritz

unread,
Jun 18, 2013, 10:43:00 AM6/18/13
to vim...@googlegroups.com, v...@vim.org
On Tuesday, June 18, 2013 2:16:03 AM UTC-5, ankur gupta wrote:
> Hello,
>
>
>
> I have extracted the tar file for txtfmt and then open a new file with vim.
>
> Then I tried following commands:
>
> :set ft=txtfmt
>
> :let maplocalleader = "-"
>
> :map -\ \DoItNow
>
>
>
> Now I was hoping to get the pompt after typing -\i (in the normal mode) to
>
> allow me change the color etc. But typing -\i or \i gets me into the Insert
>
> mode of vim. The :MakeTestPage command is showing me different colors and
>
> formats, (but I couldn't do the same in a new file or the scratch space
>
> opened with MakeTestPage).
>
>
>
> Can someone recommend me steps to activate the prompt using <LocalLeader>.
>

Assuming txtfmt is set up to follow the local leader, try setting filetype AFTER setting the localleader. Also try typing -i instead of -\i, the local leader REPLACES the \, it does not PRECEDE the \.

ankur

unread,
Jun 18, 2013, 12:20:18 PM6/18/13
to v...@vim.org
Hi,
Thanks for clarifying the localleader concept. Since I have just extracted
the tar file of the package in my ~/.vim directory, I am not sure how to set
the txtfmt to follow the local leader, so that when I type -i (or similar)
it shows me prompt to enter formatting commands... (such as cg for green
color text)

The steps I followed after extracting the tar file
:let maplocalleader = "-"
:set ft=txtfmt

I am not sure if following is also needed
:map - \DoItNow

Basically I am trying to find a way, such that, typing <LocalLeader>i will
not lead to insert mode, rather prompts me to type more txtfmt tokens..

Thanks for quick reply,
Ankur



--
View this message in context: http://vim.1045645.n5.nabble.com/txtfmt-not-starting-the-prompt-on-i-tp5716065p5716093.html

Brett Stahlman

unread,
Jun 18, 2013, 1:09:00 PM6/18/13
to vim...@googlegroups.com, v...@vim.org
On Tuesday, June 18, 2013 11:20:18 AM UTC-5, ankur gupta wrote:
> Hi,
>
> Thanks for clarifying the localleader concept. Since I have just extracted
>
> the tar file of the package in my ~/.vim directory, I am not sure how to set
>
> the txtfmt to follow the local leader, so that when I type -i (or similar)
>
> it shows me prompt to enter formatting commands... (such as cg for green
>
> color text)
>
>
>
> The steps I followed after extracting the tar file
>
> :let maplocalleader = "-"
>
> :set ft=txtfmt
>
>
>
> I am not sure if following is also needed
>
> :map - \DoItNow
>
>
>
> Basically I am trying to find a way, such that, typing <LocalLeader>i will
>
> not lead to insert mode, rather prompts me to type more txtfmt tokens..

Ankur,
I did...


let maplocalleader = "-"
set ft=txtfmt

...just as you did, and -i brings up the Txtfmt prompt for me.

Things to check...

Do you have filetype plugins enabled: e.g., a line similar to...
:filetype plugin on
...somewhere in your vimrc?

Do you see ftplugin/txtfmt.vim in the output of...
:scriptnames
...after you set ft=txtfmt?

Brett S.

ankur

unread,
Jun 19, 2013, 6:14:43 AM6/19/13
to v...@vim.org
Thanks Brett,

My filetype plugin wasn't on. After setting it on, I could now get txtfmt
prompt and use it to color/format text in my files...

Thanks a lot for developing the plugin/package.. I have two unrelated
issues..

First, (general vim syntax related) can I define multiple comments, ie, to
let the colorscheme recognize multiple markers at the start of line (say #
to color blue and * to color red).
Secondly not directly related to txtfmt, but to notes plugin. I want to
apply 'notes' plugin to any random directory, but following allows me to
specify those directories.
:let g:notes_directories = ['~/Documents/Notes', '~/Dropbox/Shared Notes']
Is there a way to atleast allow me to use directory structure (upto any
level) within a specified directory..

Ankur




--
View this message in context: http://vim.1045645.n5.nabble.com/txtfmt-not-starting-the-prompt-on-i-tp5716065p5716135.html

Stahlman%20Family

unread,
Jun 19, 2013, 8:09:32 AM6/19/13
to vim use, v...@vim.org


----- Original Message -----
> From: "ankur" <guptaan...@gmail.com>
> To: v...@vim.org
> Sent: Wednesday, June 19, 2013 5:14:43 AM
> Subject: Re: txtfmt not starting the prompt on \i
> Thanks Brett,
>
> My filetype plugin wasn't on. After setting it on, I could now get
> txtfmt
> prompt and use it to color/format text in my files...
>
> Thanks a lot for developing the plugin/package..

No problem. I'm glad you find it useful.

> I have two unrelated issues..
>
> First, (general vim syntax related) can I define multiple comments,
> ie, to
> let the colorscheme recognize multiple markers at the start of line
> (say #
> to color blue and * to color red).
> Secondly not directly related to txtfmt, but to notes plugin. I want
> to
> apply 'notes' plugin to any random directory, but following allows me
> to
> specify those directories.
> :let g:notes_directories = ['~/Documents/Notes', '~/Dropbox/Shared
> Notes']
> Is there a way to atleast allow me to use directory structure (upto
> any
> level) within a specified directory..

If I understand what you're after, you want to be able to specify a path like...
~/BaseDir/**
...to have all directories below BaseDir included in the search? Vim supports the `**' syntax, but I'm not sure how the notes plugin does its search. Perhaps the plugin author will weigh in...
:help **

Brett S.

>
> Ankur
>
>
>
>
> --
> View this message in context:
> http://vim.1045645.n5.nabble.com/txtfmt-not-starting-the-prompt-on-i-tp5716065p5716135.html
> Sent from the Vim - General mailing list archive at Nabble.com.
>
> --
> --
> 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+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages