Tuesday, May 24, 2011

Re: make terminal VIM my default text editor Ubuntu 11.04

Hi Juan,

Even if this is a little off-topic, I feel like having to clarify my answer:

Creating a shell script just circumvents looking at the freedesktop.org
documentation, which I also did not do ;-)
Actually, I think that pansz solution is much cleaner than mine *and* it can
handle guake as well as a shell script.

I am not sure, if I understood guake command line options completely, but
putting
Exec=guake -e "vim \"%F\""
into your .desktop file should do the job.

Tobias

On Tuesday 24 May 2011 23:41:23 Juan incaurgarat wrote:
> Tobias, thanks for your answer, but to be honest, i dont really understand
> where is it going.
> i have no idea of bash coding, so im very sorry that i cant understand your
> idea =(
>
> e.g.: i dont even have a favorite terminal emulator. oh wait, maybe i do! i
> use GUAKE terminal, i mean, i like it more than the default ubuntu
> terminal. maybe thats your point! is it?
>
> getting excited now!
> thanks
>
> juan
>
> On Tue, May 24, 2011 at 8:14 AM, Tobias Columbus <
>
> tobias.columbus@googlemail.com> wrote:
> > On Tuesday 24 May 2011 00:20:42 Juan incaurgarat wrote:
> > > hi, ive spent the last two working days trying to make terminal VIM my
> > > default text editor with no luck.
> > > im using ubuntu 1104 and i dont like GVIM
> > >
> > > what ive done so far:
> > > created a vim.desktop file on ~/.local/share/applications with this
> > > lines inside
> > >
> > > [Desktop Entry]
> > > Version=1.0
> > > Type=Application
> > > Name=VIM
> > > #Exec=/usr/share/vim/vim73/tools/vimm
> > > Exec=gnome-terminal -e "vim \"$1\""
> > >
> > > after that, ive edited the mimeapps.list file
> > > and now it looks like this
> > >
> > > [Added Associations]
> > > text/csv=openoffice.org-calc.desktop;gedit.desktop;
> >
> > openoffice.org-writer.de
> >
> > > sktop;
> > > application/vnd.ms-powerpoint=evince.desktop;libreoffice-impress.deskto
> > > p; application/illustrator=gimp.desktop;
> > > application/x-shockwave-flash=totem.desktop;vlc.desktop;firefox.desktop
> > > ;
> >
> > text/plain=vim.desktop;userapp-vim-0QYSVV.desktop;userapp-vim.gnome-DY1RV
> > V.
> >
> > > desktop;
> > >
> > > [Default Applications]
> > > application/vnd.ms-powerpoint=libreoffice-impress.desktop
> > > *text/plain=vim.desktop*
> > >
> > > the bold line is the one ive added
> > >
> > > so, this changes makes VIM execute when i double click on a plain text
> > > file, but it doesnt open the file ive just clicked
> > > it seems to open a new file called $1
> > >
> > > this is the closest ive got
> > >
> > > any help please?
> > >
> > > kilinkis
> >
> > Hi,
> >
> > what about creating a small wrapper script around your terminal emulator
> > and
> > vim, i.e.
> >
> > Create a file console_vim.sh in either /usr/local/bin or ~/bin
> > containing the following commands:
> >
> > #!/bin/sh
> > IFS=$'\n' # cope with filenames containing spaces
> > <your favourite terminal emulator> -e vim $1
> >
> > then you make that file executable via chmod +x console_vim.sh
> > and make this your standard editor.
> >
> > Note that I have testes this only with konsole and xterm, so the command
> > line
> > options to <your favourite terminal emulator> may differ!
> >
> > Cheers
> > Tobias
> >
> > --
> > __________________________
> > Tobias Columbus
> > t.columbus@gmx.de
> >
> > --
> > 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

--
__________________________
Tobias Columbus
t.columbus@gmx.de

--
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

No comments: