On 2015-11-17, Paolo Bolzoni wrote:
> Dear list,
>
> I would like to disable all the "smart" auto indenting. I just want
> the cursor to align to the previous line non space character. I will
> press tab or << to fix in the case it is wrong.
>
> I set this lines from the wiki in the ~/.vimrc, but it is not enough.
>
> set autoindent
> set nocindent
> set nosmartindent
> set indentexpr=
>
> What should I check? Am I missing some other settings?
If you have filetype detection enabled (e.g., by "filetype on"),
filetype indent plugins may set some of those automatically. Try
putting this in your ~/.vimrc as well:
filetype indent off
See
:help :filetype-indent-off
HTH,
Gary
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, November 17, 2015
Re: Disable all autointending a part of the simplest one
On Tuesday, November 17, 2015 at 10:07:40 AM UTC-6, Paolo Bolzoni wrote:
> Dear list,
>
> I would like to disable all the "smart" auto indenting. I just want
> the cursor to align to the previous line non space character. I will
> press tab or << to fix in the case it is wrong.
>
> I set this lines from the wiki in the ~/.vimrc, but it is not enough.
>
> set autoindent
> set nocindent
> set nosmartindent
> set indentexpr=
>
> What should I check? Am I missing some other settings?
>
>
> Cheers,
> Paolo
My guess is your filetype settings are turning indent back on after you've turned them off in your .vimrc.
Do you have "filetype plugin indent on" in your .vimrc? Or maybe "filetype indent on"?
If so, remove the word "indent" and filetype-based indentation rules will be turned off.
If that's not the problem, then ":verbose set cindent? smartindent? indentexpr?" should tell you what they are set to and which script set them that way. Run this command after you notice the unwanted behavior.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> Dear list,
>
> I would like to disable all the "smart" auto indenting. I just want
> the cursor to align to the previous line non space character. I will
> press tab or << to fix in the case it is wrong.
>
> I set this lines from the wiki in the ~/.vimrc, but it is not enough.
>
> set autoindent
> set nocindent
> set nosmartindent
> set indentexpr=
>
> What should I check? Am I missing some other settings?
>
>
> Cheers,
> Paolo
My guess is your filetype settings are turning indent back on after you've turned them off in your .vimrc.
Do you have "filetype plugin indent on" in your .vimrc? Or maybe "filetype indent on"?
If so, remove the word "indent" and filetype-based indentation rules will be turned off.
If that's not the problem, then ":verbose set cindent? smartindent? indentexpr?" should tell you what they are set to and which script set them that way. Run this command after you notice the unwanted behavior.
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Disable all autointending a part of the simplest one
Dear list,
I would like to disable all the "smart" auto indenting. I just want
the cursor to align to the previous line non space character. I will
press tab or << to fix in the case it is wrong.
I set this lines from the wiki in the ~/.vimrc, but it is not enough.
set autoindent
set nocindent
set nosmartindent
set indentexpr=
What should I check? Am I missing some other settings?
Cheers,
Paolo
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would like to disable all the "smart" auto indenting. I just want
the cursor to align to the previous line non space character. I will
press tab or << to fix in the case it is wrong.
I set this lines from the wiki in the ~/.vimrc, but it is not enough.
set autoindent
set nocindent
set nosmartindent
set indentexpr=
What should I check? Am I missing some other settings?
Cheers,
Paolo
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: auto indentation corrupted after comment block in c++ file
Hi Klaus,
2015-11-17(Tue) 16:53:26 UTC+9 Klaus Rudolph:
> Hi all,
>
> I want to auto indent the following file:
>
> class X
> {
> public:
> void foo()
> {
> }
>
> /*
> Check
> After this comment block the indentation changes
> Next method goes to previous column
> */
> void bar() //<<< WRONG INDENTATION HERE after comment block
> {
> }
> };
>
> I use "gg=G" to format the file. As you can see, after the comment block the indentation changes back one column which is
> not what I want.
>
> Any idea how to change that strange behavior?
This problem fixed by Patch 7.4.891.
https://groups.google.com/d/topic/vim_dev/1bwr9Okj8yg/discussion
Please use Vim 7.4.891 or later.
--
Best regards,
Hirohito Higashi (a.k.a h_east)
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2015-11-17(Tue) 16:53:26 UTC+9 Klaus Rudolph:
> Hi all,
>
> I want to auto indent the following file:
>
> class X
> {
> public:
> void foo()
> {
> }
>
> /*
> Check
> After this comment block the indentation changes
> Next method goes to previous column
> */
> void bar() //<<< WRONG INDENTATION HERE after comment block
> {
> }
> };
>
> I use "gg=G" to format the file. As you can see, after the comment block the indentation changes back one column which is
> not what I want.
>
> Any idea how to change that strange behavior?
This problem fixed by Patch 7.4.891.
https://groups.google.com/d/topic/vim_dev/1bwr9Okj8yg/discussion
Please use Vim 7.4.891 or later.
--
Best regards,
Hirohito Higashi (a.k.a h_east)
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Monday, November 16, 2015
auto indentation corrupted after comment block in c++ file
Hi all,
I want to auto indent the following file:
class X
{
public:
void foo()
{
}
/*
Check
After this comment block the indentation changes
Next method goes to previous column
*/
void bar() //<<< WRONG INDENTATION HERE after comment block
{
}
};
I use "gg=G" to format the file. As you can see, after the comment block the indentation changes back one column which is
not what I want.
Any idea how to change that strange behavior?
Thanks
Klaus
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I want to auto indent the following file:
class X
{
public:
void foo()
{
}
/*
Check
After this comment block the indentation changes
Next method goes to previous column
*/
void bar() //<<< WRONG INDENTATION HERE after comment block
{
}
};
I use "gg=G" to format the file. As you can see, after the comment block the indentation changes back one column which is
not what I want.
Any idea how to change that strange behavior?
Thanks
Klaus
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: How to pass the word under curor as the para to the command
imlegendlzz@gmail.com wrote:
> command! -nargs=1 -bar Pyhelp :call ShowPydoc(<f-args>)
> nnoremap <buffer> <silent> K :exe ":Pyhelp expand('<cword>')"
>
> I define a ShowPydoc func,
>
> If you type ":Pyhelp xxx"
>
> you will get the help of xxx.
>
> Now I want to map the K to the that if I move the curor on the word that I want to get the helpdoc.
>
> But expand('<cword>') here can't get the word under curor and pass the "expand(<'cword'>)" to the func.
>
> And I try :echo expand(<'cword'>) it worked,
>
You could use :ManPageView for this, you know; it does the "k" map for
python already.
Manpageview is available at:
http://www.drchip.org/astronaut/vim/index.html#MANPAGEVIEW (cutting
edge)
http://vim.sourceforge.net/scripts/script.php?script_id=489 (stable)
Installation is simple:
vim manpageview.vba.gz
:so %
:q
Regards,
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> command! -nargs=1 -bar Pyhelp :call ShowPydoc(<f-args>)
> nnoremap <buffer> <silent> K :exe ":Pyhelp expand('<cword>')"
>
> I define a ShowPydoc func,
>
> If you type ":Pyhelp xxx"
>
> you will get the help of xxx.
>
> Now I want to map the K to the that if I move the curor on the word that I want to get the helpdoc.
>
> But expand('<cword>') here can't get the word under curor and pass the "expand(<'cword'>)" to the func.
>
> And I try :echo expand(<'cword'>) it worked,
>
You could use :ManPageView for this, you know; it does the "k" map for
python already.
Manpageview is available at:
http://www.drchip.org/astronaut/vim/index.html#MANPAGEVIEW (cutting
edge)
http://vim.sourceforge.net/scripts/script.php?script_id=489 (stable)
Installation is simple:
vim manpageview.vba.gz
:so %
:q
Regards,
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Re: How to pass the word under curor as the para to the command
在 2015年11月16日星期一 UTC+8下午8:43:59,ZyX写道:
> 2015-11-16 15:20 GMT+03:00 <imleg...@gmail.com>:
> command! -nargs=1 -bar Pyhelp :call ShowPydoc(<f-args>)
>
>
>
>
> You explicitly request here to escape the function arguments by using `<f-args>`.
>
>
> nnoremap <buffer> <silent> K :exe ":Pyhelp expand('<cword>')"
>
>
>
>
> so that here actual argument is `"expand('<cword>')"` literally. Of course, this is not going to work. Move `expand('<cword>')` out of the quotes: `:execute 'Pyhelp' expand('<cword>')`
>
>
>
>
> I define a ShowPydoc func,
>
>
>
> If you type ":Pyhelp xxx"
>
>
>
> you will get the help of xxx.
>
>
>
> Now I want to map the K to the that if I move the curor on the word that I want to get the helpdoc.
>
>
>
> But expand('<cword>') here can't get the word under curor and pass the "expand(<'cword'>)" to the func.
>
>
>
> And I try :echo expand(<'cword'>) it worked,
>
>
>
> How can I fix it?
>
>
>
> --
>
> --
>
> 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/d/optout.
tnx a lot for your help :)
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
> 2015-11-16 15:20 GMT+03:00 <imleg...@gmail.com>:
> command! -nargs=1 -bar Pyhelp :call ShowPydoc(<f-args>)
>
>
>
>
> You explicitly request here to escape the function arguments by using `<f-args>`.
>
>
> nnoremap <buffer> <silent> K :exe ":Pyhelp expand('<cword>')"
>
>
>
>
> so that here actual argument is `"expand('<cword>')"` literally. Of course, this is not going to work. Move `expand('<cword>')` out of the quotes: `:execute 'Pyhelp' expand('<cword>')`
>
>
>
>
> I define a ShowPydoc func,
>
>
>
> If you type ":Pyhelp xxx"
>
>
>
> you will get the help of xxx.
>
>
>
> Now I want to map the K to the that if I move the curor on the word that I want to get the helpdoc.
>
>
>
> But expand('<cword>') here can't get the word under curor and pass the "expand(<'cword'>)" to the func.
>
>
>
> And I try :echo expand(<'cword'>) it worked,
>
>
>
> How can I fix it?
>
>
>
> --
>
> --
>
> 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/d/optout.
tnx a lot for your help :)
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Posts (Atom)