Il giorno giovedì 5 dicembre 2013 22:39:41 UTC+1, Gary Johnson ha scritto:
> On 2013-12-05, Ajabu Tex wrote:
> 
> > Hello.
> > 
> > On linux mint 16, to open a file with vim in the terminal i wrote a
> > nemo action that sends to the system the following command:
> > 
> >     gnome-terminal --working-directory=%P -e "vim %F"
> > 
> > where %P is the insert path of parent (current) directory and %F is
> > the insert path list of selection.
> > 
> > The trick seems to work and the selected file is opened, but many
> > lines in file are badly showed or not showed at all and CTRL-L
> > doesn't work.
> > 
> > Where can be the problem?
> 
> I don't have access to my Mint installation at the moment, but my
> guess is that Vim isn't getting the number of lines and columns
> being used by the terminal.
> 
> You can see the numbers that Vim is using with
> 
>     :set columns? lines?
> 
> Then shell out with ":sh" and at the shell prompt execute
> 
>     $ echo $COLUMNS $LINES
>     $ tput cols
>     $ tput lines
> 
> Those values should all agree with each other and with the actual
> size of the terminal.
> 
> HTH,
> Gary

It seems that you're right. In my vimrc file I got the statement

    set columns=82 lines=45

while the terminal has dimension = 80x24.

So I tried to change the command for the nemo action in this way:

    gnome-terminal --geometry=80x45 --working-directory=%P -e "vim %F"

and it seems to work properly.

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to