saving window setting

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

saving window setting

Pujo Aji
Hello I'm new to VIM.
I would like to change something in gVIM but I don't know how to save
it. Please help.

1. To change colour scheme.
I click edit, colorscheme, pablo.
If I go out, and go in again the color is back is not changed.
This is also the same with the font size.

2. Edit setting windows.
Whenever I try to save it, it always show error message:
E382: cannot write, 'buftype' option is set

3. I can't fold python code

Can anyone explain this?

I use windows xp sp2.

pujo
Reply | Threaded
Open this post in threaded view
|

Re: saving window setting

James Vega-3
On Sun, Jun 19, 2005 at 11:43:42AM +0200, Pujo Aji wrote:
> 1. To change colour scheme.

Any settings that you want to have remembered across sessions need to be
placed in your _vimrc (or _gvimrc for Gvim-related settings).  All you
have to do is place the command (the : is not necessary) that you would
normally run into the respective file.  For example, to remember the
colorscheme, add

colorscheme pablo

to your _gvimrc.

> 2. Edit setting windows.

If you're trying to save your settings, those go in your _vimrc and
_gvimrc files.

:help vimrc

That will tell you where Vim expects the files.

:echo $HOME

Running that in Vim will tell you what Vim thinks your home directory
is.

> 3. I can't fold python code

Yes, you can.  You just need to change some settings.  With Python, the
easiest thing to do is

:set foldmethod=indent

In summary, here are some relevant help topics

:help folding
:help foldmethod:
:help vimrc
:help :mkvimrc

James
--
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[hidden email]>

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: saving window setting

Charles E Campbell Jr
In reply to this post by Pujo Aji
Quoting Pujo Aji <[hidden email]>:

> Hello I'm new to VIM.
> I would like to change something in gVIM but I don't know how to save
> it. Please help.
>
> 1. To change colour scheme.
> I click edit, colorscheme, pablo.
> If I go out, and go in again the color is back is not changed.
> This is also the same with the font size.

Generally one stores long-term changes by saving the associated commands
and settings in a .vimrc or .gvimrc file.  In the case of changing to
a new colorscheme, put in your .vimrc:

   colorscheme pablo

> 2. Edit setting windows.
> Whenever I try to save it, it always show error message:
> E382: cannot write, 'buftype' option is set

What is a "setting window"?
To see that window's buftype, :set buftype?

To change settings, edit your .vimrc file and place whatever settings
in there you want.

> 3. I can't fold python code

I'm afraid I'm not a python user.  Have you checked on how to do folding
with

   :help fold
   :help foldmethod

etc?  It doesn't appear that the python syntax file currently supports
syntax-based folding, if that's what you're after.

Regards,
Chip Campbell




Reply | Threaded
Open this post in threaded view
|

Re: saving window setting

Tim Chase-2
>>3. I can't fold python code
>
>
> I'm afraid I'm not a python user. Have you checked on how to
> do folding with
>
>    :help fold
>    :help foldmethod
>
> etc?  It doesn't appear that the python syntax file currently
> supports syntax-based folding, if that's what you're after.

Well, to supplement Dr. Chip's sage advice, since Python uses
indentation to determine blocks (rather than begin/end tokens),
syntax folding may be superfluous. Simply using

        :set foldmethod=indent

may solve most of the problems. All your standard commands for
folds should then work... zo, zO, zc, zC, zR, zr, zm, zM, zj, zk,
etc.

-tim





Reply | Threaded
Open this post in threaded view
|

Re: saving window setting

Marian Csontos
In reply to this post by Charles E Campbell Jr
On Mon, 20 Jun 2005 15:17:06 +0200, <[hidden email]> wrote:

> Quoting Pujo Aji <[hidden email]>:
>> 2. Edit setting windows.
>> Whenever I try to save it, it always show error message:
>> E382: cannot write, 'buftype' option is set
>
> What is a "setting window"?

:he :options

this is not config file, it is only way how to configure your current  
running vim.
it is not supposed to be saved. all you changed here and want make it  
persistent you must save to your .vimrc, for example by :mkvimrc (which  
saves .vimrc in your current working directory, so probably you want to  
copy it to $HOME, ~, or elsewhere depending on your demands)

:he .vimrc
:he :mkvimrc



________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
Reply | Threaded
Open this post in threaded view
|

Re: saving window setting

Charles E Campbell Jr
Quoting Marian Csontos <[hidden email]>:

> On Mon, 20 Jun 2005 15:17:06 +0200, <[hidden email]> wrote:
>
> > Quoting Pujo Aji <[hidden email]>:
> >> 2. Edit setting windows.
> >> Whenever I try to save it, it always show error message:
> >> E382: cannot write, 'buftype' option is set
> >
> > What is a "setting window"?
>
> :he :options

Looks like I'm still learning vim, too!
Didn't know about :options...

Regards,
Chip Campbell
Reply | Threaded
Open this post in threaded view
|

Re: saving window setting

A.J.Mechelynck
In reply to this post by Marian Csontos
Marian Csontos wrote:

> On Mon, 20 Jun 2005 15:17:06 +0200, <[hidden email]> wrote:
>
>> Quoting Pujo Aji <[hidden email]>:
>>
>>> 2. Edit setting windows.
>>> Whenever I try to save it, it always show error message:
>>> E382: cannot write, 'buftype' option is set
>>
>>
>> What is a "setting window"?
>
>
> :he :options
>
> this is not config file, it is only way how to configure your current
> running vim.
> it is not supposed to be saved. all you changed here and want make it
> persistent you must save to your .vimrc, for example by :mkvimrc (which
> saves .vimrc in your current working directory, so probably you want to
> copy it to $HOME, ~, or elsewhere depending on your demands)
>
> :he .vimrc
> :he :mkvimrc
>
>
>
> ________ Information from NOD32 ________
> This message was checked by NOD32 Antivirus System for Linux Mail Server.
> http://www.nod32.com
>
>
>

The settings you set in the :options window are set as soon as you hit
<Enter>, they remain set until you close Vim.

":options" is *not* the only way to configure your current running Vim,
there is also the ":set" command (q.v.).

To keep an option value across Vim sessions, write the corresponding
":set" line in your vimrc. Examples (showing the line as it appears in
the ":options" window after you hit <Enter> on it):

In ":options" window:

autowriteall as 'autowrite', but works with more commands
        set awa noawa

guifont list of font names to be used in the GUI
  set gfn=Lucida_Console:h8:cDEFAULT


In _vimrc:

        set autowriteall
        set guifont=Lucida_Console:h8:cDEFAULT


You need only add settings in your vimrc as you change them using
":options" or ":set": default settings need not be in the vimrc.


Best regards,
Tony.