Indenting

2012-10-24 Thread analogsix
I created a 'scratch notes file' of VIM commands on gvim on my home pc's Fedora desktop environment. When I port this file to my workplace's UNIX environment and launch the notes from VIM, my tab spacing is thrown off. For example, at home my text looks like this: command1<- comment bla

Groovy Indenting

2008-10-17 Thread Nate
Hello, I have a script that's written in the Groovy language, and the indenting seems to be buggy. The groovy.vim file that I'm using is 4 years old, and hasn't had any updates to it since then. Here's the problem: I have: #!/bin/env groovy class Foo { def bar()

c-indenting..

2009-07-10 Thread KingTiger
hi all, vim c-indenting help say that: Vim puts a line in column 1 if: - It starts with a label (a keyword followed by ':', other than "case" and "default"). but i don't wanna put it col 1, is there an option o

Indenting/formating

2012-04-24 Thread Gautier DI FOLCO
Hi, I recently look for re-(format|indent)ing my code and after many queries on google or in :help I didn't find a satisfactory solution. On websites I found a solution with AStyle or indent and in :help I have to make a very big function. Basically I want to follow de Allman Style ( http://en.wik

Re: Indenting

2012-10-24 Thread Tim Chase
On 10/24/12 21:02, analogsix wrote: > I created a 'scratch notes file' of VIM commands on gvim on my home pc's > Fedora desktop environment. > When I port this file to my workplace's UNIX environment and launch the notes > from VIM, my tab spacing is thrown off. For example, at home my text looks

Re: Indenting

2012-10-24 Thread Tony Mechelynck
" to change tabs <-> spaces :help modeline" what a modeline may look like :help 'modeline' " enable/disable modelines :help 'modelines' " how far from top/bottom they may be and possibly :

Re: Indenting

2012-10-25 Thread analogsix
Thanks guys, tabstop did it. I read the help text on :tabstop, :softtabstop, :expandtab, :shiftwidth I'll list a description of each according to how I understand it. Can you kindly correct my understanding where I'm mistaken? :set tabstop=# also known as a hard tab. Configuring this setting

Re: Indenting

2012-10-25 Thread Ben Fritz
On Thursday, October 25, 2012 12:35:57 PM UTC-5, analogsix wrote: > Thanks guys, > > tabstop did it. I read the help text on > :tabstop, :softtabstop, :expandtab, :shiftwidth > > I'll list a description of each according to how I understand it. Can you > kindly correct my understanding where I

Re: Indenting

2012-10-25 Thread Gary Johnson
On 2012-10-25, Ben Fritz wrote: > On Thursday, October 25, 2012 12:35:57 PM UTC-5, analogsix wrote: > > :set softtabstop=# > > also known as a soft tab (default is 0 which means it is a > > disabled setting). However if a nonzero number is set that is > > greater than :tabstop then s and s in inse

Re: Indenting

2012-10-25 Thread Ben Fritz
On Thursday, October 25, 2012 6:04:11 PM UTC-5, Gary Johnson wrote: > On 2012-10-25, Ben Fritz wrote: > > This option also affects autoindent. Autoindent always works in > > multiples of your 'shiftwidth' option. > > Are you sure you meant autoindent? Autoindent doesn't care about > the value of

Indenting Problem

2013-01-10 Thread Adolfo Olivera
Hi, I'm trying to indent several lines at the same time in visual mode with "*>*". Problem is not respecting the *set ts=2* that I have on my *.vimrc*file. How can I make it to indent just two spaces? Adolfo Olivera 15-3429-9743 -- You received this message from the "vim_use" maillist. Do no

Re: Groovy Indenting

2008-10-17 Thread Tony Mechelynck
On 18/10/08 02:14, Nate wrote: > Hello, > > I have a script that's written in the Groovy language, and the > indenting seems to be buggy. > > The groovy.vim file that I'm using is 4 years old, and hasn't had any > updates to it since then. > > Here's

Re: Groovy Indenting

2008-10-17 Thread Nate
> > > I have a script that's written in the Groovy language, and the > > indenting seems to be buggy. > > > The groovy.vim file that I'm using is 4 years old, and hasn't had any > > updates to it since then. > > > Here's the problem: > >

Re: Groovy Indenting

2008-10-17 Thread Nate
; wrote: > On 18/10/08 02:14, Nate wrote: > > > > > Hello, > > > I have a script that's written in the Groovy language, and the > > indenting seems to be buggy. > > > The groovy.vim file that I'm using is 4 years old, and hasn't had

Re: Groovy Indenting

2008-10-18 Thread Tony Mechelynck
On 18/10/08 03:33, Nate wrote: > Here's the output from the commands that you had me run: >autoindent > Last set from ~/.vimrc > nocopyindent > nocindent >cinoptions= >indentexpr=GetVimIndent() > Last set from /Applications/MacVim.app/Contents/Resources/vim/runtime/ > inden

Re: Groovy Indenting

2008-10-18 Thread Tony Mechelynck
n't used when 'indentexpr' is empty). It also means that it's pointless to try to use automatic _reindent_ on such a file since (with no $VIMRUNTIME/indent/groovy.vim) it's only set for manual indenting. Best regards, Tony. -- We have reason to beli

Indenting python scripts

2009-09-19 Thread meino . cramer
Hi, I am a C/C++-programmer. And I a first time tourist in the world of python. I am travelling with "vim Air"... My questions to the pilots of this airline are: Since python does not have start-/end-of-block marker a la "{}" in C: How can I indent a block of code? How does vim know, ho

Trouble with indenting

2009-10-27 Thread Magnus ...
Hi all, I'm having trouble configuring indenting. My needs would seem, on the face of it, relatively simple: I would like { and } to trigger indenting and outdenting, and I would like >> and << to work for all lines - including lines starting with # (comments). An example lin

Indenting ruby code

2009-11-25 Thread Tuo Pe
Hello! I have installed the files from and the script . However, when editing ruby code, tab size seems to eight (8), which is too much. What is the proper way and place to change this? After :set sw=2

Indenting Python blocks

2011-01-20 Thread Daryl Lee
I'd like to add a level of indent to a region with a single keystroke. Here's what I mean: Let's say I've decided to wrap an existing region in an if statement, meaning that region now needs to be indented another 4 spaces. In C I could select the region and press = and it's done. The only t

language-specific indenting?

2010-07-29 Thread Lev Lvovsky
it's not at all indented, can perl automatically indent it for me? Ideally, this would include things like datastructures, but it seems in my attempts, that that's where parsing/indenting fails. I'm using the '=' command for indentation. Thank you! -lev -- You receive

Python indenting of '#'

2010-08-15 Thread meino . cramer
Hi, after surfing the web for python related help for vim I found several sites with different versions of "the best way" to handle python files in vim. There is one thing (besides other others, which I have't figured out yet ;) ) which I want to fix: Regardless how deep the level of inden

indenting ruby code

2012-04-12 Thread a_olme
Hello all, To try to confirm with my teams indenting rules for ruby code I would need to change the indenting of my rspec files so that the do that follows the it doesn't cause an extra indentation. Tried to workout how vim-ruby indentfile worked but has no clue at all how it works :).

Re: Indenting/formating

2012-04-24 Thread Ben Fritz
I > would align commas dots,  or > even comments, but it's > still basic. > > I don't want an external tool because I work on many computers with many > constraints. > If I assume correctly that you're writing code in C, just turn on filetype-specific inden

Re: Indenting/formating

2012-04-24 Thread Gautier DI FOLCO
Le 24 avril 2012 16:54, Ben Fritz a écrit : > If I assume correctly that you're writing code in C, just turn on > filetype-specific indenting, or turn on 'cindent'. If you want to tweak the > automatic indenting, update the 'cinoptions' setting. > > See th

RE: Indenting/formating

2012-04-25 Thread John Beckett
Gautier DI FOLCO wrote: > I known this page but I would go further : the equal sign > must have a space before and after, commas should be followed > by a space, the keywords of sctructure control (if, switch, > for, do, etc.) must be followed by a space before the > parenthesis, braces should be o

Re: Indenting/formating

2012-04-25 Thread Michael Henry
On 04/25/2012 03:26 AM, John Beckett wrote: > Gautier DI FOLCO wrote: >> I known this page but I would go further : the equal sign >> must have a space before and after, [...] > > I don't think Vim is suitable for that. For a tool outside of Vim, you might like "uncrustify": http://uncrustify.sour

Re: Indenting/formating

2012-04-25 Thread Ben Fritz
On Wednesday, April 25, 2012 4:58:23 AM UTC-5, Michael Henry wrote: > On 04/25/2012 03:26 AM, John Beckett wrote: > > Gautier DI FOLCO wrote: > >> I known this page but I would go further : the equal sign > >> must have a space before and after, [...] > > > > I don't think Vim is suitable for that.

Re: Indenting Problem

2013-01-10 Thread Alick Zhao
On Thu, 10 Jan 2013 11:32:32 -0300, Adolfo Olivera wrote: > Hi, > I'm trying to indent several lines at the same time in visual mode > with "*>*". Problem is not respecting the *set ts=2* that I have on my > *.vimrc* file. How can I make it to indent just two spaces? > > indents the line acco

Re: Indenting Problem

2013-01-10 Thread Jeroen Budts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 01/10/2013 03:32 PM, Adolfo Olivera wrote: > Hi, I'm trying to indent several lines at the same time in visual > mode with "*>*". Problem is not respecting the *set ts=2* that I > have on my *.vimrc* file. How can I make it to indent just two > sp

indenting contnued line

2013-05-24 Thread rudrab
Hello friends, for a continued line, say, in C, void some_function(argument1, more_arg) is the natural behavior of vim (with my current vimrc). I want it to be like void some_function(argument1, more_arg) i.e. when I press enter after reaching the end of first line, cursor shou

indenting blocks inside brackets

2008-10-17 Thread Ben Kim
I think if my previous email didn't get to the list because it had a redirection character (angle bracket) in the subject. I have this question regarding >% or <%. In this snippet: = int main() { if (a) { cout << "first" << endl; if (b) { cout << "second" << endl; } } retur

Re: Indenting python scripts

2009-09-20 Thread Tim Chase
> I am a C/C++-programmer. > And I a first time tourist in the world of python. welcome to my favorite language :) > Since python does not have start-/end-of-block > marker a la "{}" in C: How can I indent a > block of code? How does vim know, how large > such a block is, where it starts a

Re: Indenting python scripts

2009-09-20 Thread meino . cramer
Tim Chase [09-09-20 11:14]: > > > I am a C/C++-programmer. > > And I a first time tourist in the world of python. > > welcome to my favorite language :) > > > Since python does not have start-/end-of-block > > marker a la "{}" in C: How can I indent a > > block of code? How does vim know,

Re: Indenting python scripts

2009-09-20 Thread Raúl Núñez de Arenas Coronado
Saluton :) skribis: > What remains is my question: How can I ident python code? [...] > Pressing TABs in each line? NO! That's the last resort! > Marking a visual block and do a I^V^I? A bit better than the above, but requires many keypresses ;) > Or there something more efficient? I find t

Re: Indenting python scripts

2009-09-20 Thread Gary Johnson
On 2009-09-20, Raúl Núñez de Arenas Coronado wrote: > Saluton :) > > skribis: > > What remains is my question: How can I ident python code? [...] > > Or there something more efficient? [Explanation of >>, <<, > and <.] Also, if you're in insert mode when you want to change the indentation of

Re: Indenting python scripts

2009-09-20 Thread pansz
meino.cra...@gmx.de 写道: > Since python does not have start-/end-of-block > marker a la "{}" in C: How can I indent a > block of code? How does vim know, how large > such a block is, where it starts and where it > ends? How can I acchieve, what "==" does for > C/C++-code? do you mean "add 1

Re: Trouble with indenting

2009-10-27 Thread Magnus ...
On Oct 27, 12:26 pm, "Magnus ..." wrote: > Hi all, > I would like { and } to trigger > indenting and outdenting, and I would like >> and << to work for all > lines - including lines starting with # (comments). An example line > looks like this: > >

RE: Trouble with indenting

2009-10-27 Thread John Beckett
Magnus wrote: > I've tried using smartindent, but it seems impossible to > configure that to handle # using >>. Read the explanation here, including the linked tip discussing '#'. http://vim.wikia.com/wiki/Indenting_source_code John --~--~-~--~~~---~--~~ You re

RE: Indenting ruby code

2009-11-25 Thread John Beckett
Tuo Pe wrote: > What is the proper way and place to change this? After > > :set sw=2 > :set ts=2 > > indentation seemed to be alright. Anyway, what is the proper > way to change the indentation size? That's correct to use a tab for each indent. Read more here: http://vim.wikia.com/wiki/Inden

RE: Indenting ruby code

2009-11-25 Thread Tuo Pe
> That's correct to use a tab for each indent. Read more > here: > > http://vim.wikia.com/wiki/Indenting_source_code > > John Thanks, John, for answering and providing me with the link. Originally, I put the settings into the .vim/indent/ruby.vim file, but I will move them to .vim/after/ftplu

Re: Indenting ruby code

2009-11-26 Thread Gary Johnson
On 2009-11-26, John Beckett wrote: > Tuo Pe wrote: > > What is the proper way and place to change this? After > > > > :set sw=2 > > :set ts=2 > > > > indentation seemed to be alright. Anyway, what is the proper > > way to change the indentation size? > > That's correct to use a tab for each i

argument list auto-indenting

2010-01-06 Thread chardson
Greetings all, I've been searching hard, but not finding terribly useful results for the following problem. The problem is this: most of my labmates use emacs and specific java formatting rules (simple in emacs). I need to duplicate said rules (and have succeeded for most), but I'm not sure how

Re: Indenting Python blocks

2011-01-20 Thread AK
On 01/20/2011 07:51 PM, Daryl Lee wrote: I'd like to add a level of indent to a region with a single keystroke. Here's what I mean: Let's say I've decided to wrap an existing region in an if statement, meaning that region now needs to be indented another 4 spaces. In C I could select the region

Re: Indenting Python blocks

2011-01-20 Thread AK
On 01/20/2011 07:51 PM, Daryl Lee wrote: I'd like to add a level of indent to a region with a single keystroke. Here's what I mean: Let's say I've decided to wrap an existing region in an if statement, meaning that region now needs to be indented another 4 spaces. In C I could select the region

Re: Indenting Python blocks

2011-01-20 Thread Tim Chase
On 01/20/2011 06:51 PM, Daryl Lee wrote: Let's say I've decided to wrap an existing region in an if statement, meaning that region now needs to be indented another 4 spaces. In C I could select the region and press = and it's done. The only thing I've figured out in Python is to select the regi

Re: Indenting Python blocks

2011-01-20 Thread Daryl Lee
On 1/20/2011 6:05 PM, Tim Chase wrote: On 01/20/2011 06:51 PM, Daryl Lee wrote: Let's say I've decided to wrap an existing region in an if statement, meaning that region now needs to be indented another 4 spaces. In C I could select the region and press = and it's done. The only thing I've figur

Re: Indenting Python blocks

2011-01-20 Thread Tim Chase
On 01/20/2011 09:18 PM, Daryl Lee wrote: Thanks to both Tim and AK. This gives me just what I was looking for. I never cease to be amazed at how much power Vim has. And just in case you need it or just want to marvel at the fun you can have with vim, there's also an Ex ">" and "<" command, s

perl: indenting references (\@arr)

2011-10-30 Thread Ronald
perl-code containing references intends stange. For example: while ($ok) { if ($tbs) { &show("step 1", \@arr, [24,60,60]); &show("step 1", \@arr, [24,60,60]); &show("step 1", \@arr, [24,60,60]); &show("step 1", \@arr, [24,60,60]); &show("step 1", \@arr, [24,60,60]); &show("step 1",

Re: language-specific indenting?

2010-07-29 Thread Lev Lvovsky
On Jul 29, 2010, at 6:55 PM, Lev Lvovsky wrote: > So an emacs-using co-worker was surprised when he found out that *I* didn't > know how to do this (taking it to mean that vim didn't): > > If I'm given a perl script (I'm using this as an example since it's an > especially tricky thing to parse

Re: language-specific indenting?

2010-07-30 Thread Tony Mechelynck
hing to parse from what I understand), and it's not at all indented, can perl automatically indent it for me? Ideally, this would include things like datastructures, but it seems in my attempts, that that's where parsing/indenting fails. I'm using the '=' command for inde

Re: language-specific indenting?

2010-07-30 Thread Benjamin R. Haskell
script (I'm using this as an example since it's > > an especially tricky thing to parse from what I understand), and > > it's not at all indented, can perl automatically indent it for me? > > Ideally, this would include things like datastructures, but it seems

Re: Python indenting of '#'

2010-08-15 Thread AK
On 08/15/2010 11:27 PM, meino.cra...@gmx.de wrote: Hi, after surfing the web for python related help for vim I found several sites with different versions of "the best way" to handle python files in vim. There is one thing (besides other others, which I have't figured out yet ;) ) whi

Re: Python indenting of '#'

2010-08-15 Thread meino . cramer
AK [10-08-16 05:40]: > On 08/15/2010 11:27 PM, meino.cra...@gmx.de wrote: > >Hi, > > > > after surfing the web for python related help for vim > > I found several sites with different versions of "the best > > way" to handle python files in vim. > > > > There is one thing (besides other others

Re: Python indenting of '#'

2010-08-15 Thread Tony Mechelynck
On 16/08/10 05:45, meino.cra...@gmx.de wrote: AK [10-08-16 05:40]: On 08/15/2010 11:27 PM, meino.cra...@gmx.de wrote: Hi, after surfing the web for python related help for vim I found several sites with different versions of "the best way" to handle python files in vim. There is one

RE: Python indenting of '#'

2010-08-15 Thread John Beckett
meino wrote: > Regardless how deep the level of indentation is -- as soon > as I press '#' to comment something, the curor jumps to > column 0 and forget all indentation levels which were valid > just before entering the '#'. Our tip is: http://vim.wikia.com/wiki/Restoring_indent_after_typing_

Re: indenting ruby code

2012-04-12 Thread Mark Wilden
On Thursday, April 12, 2012 12:15:56 AM UTC-7, a_olme wrote: > To try to confirm with my teams indenting rules for ruby code I would need to > change the indenting of my rspec files so that the do that follows the it > doesn't cause an extra indentation. I don't know much a

Re: indenting ruby code

2012-04-12 Thread a_olme
Den torsdagen den 12:e april 2012 kl. 19:41:21 UTC+2 skrev Mark Wilden: > On Thursday, April 12, 2012 12:15:56 AM UTC-7, a_olme wrote: > > To try to confirm with my teams indenting rules for ruby code I would need > > to change the indenting of my rspec files so that the do t

Re: indenting ruby code

2012-04-14 Thread Mark Wilden
> > On Thursday, April 12, 2012 12:15:56 AM UTC-7, a_olme wrote: > > > To try to confirm with my teams indenting rules for ruby code I would > > > need to change the indenting of my rspec files so that the do that > > > follows the it doesn't cause an extra

Re: indenting ruby code

2012-04-16 Thread a_olme
On Saturday, April 14, 2012 11:03:28 PM UTC+2, Mark Wilden wrote: > > > On Thursday, April 12, 2012 12:15:56 AM UTC-7, a_olme wrote: > > > > To try to confirm with my teams indenting rules for ruby code I would > > > > need to change the indenting of m

Re: indenting ruby code

2012-04-16 Thread a_olme
On Tuesday, April 17, 2012 7:39:01 AM UTC+2, a_olme wrote: > On Saturday, April 14, 2012 11:03:28 PM UTC+2, Mark Wilden wrote: > > > > On Thursday, April 12, 2012 12:15:56 AM UTC-7, a_olme wrote: > > > > > To try to confirm with my teams indenting rules for ruby c

Re: indenting ruby code

2012-04-17 Thread Mark Wilden
On Monday, April 16, 2012 10:48:03 PM UTC-7, a_olme wrote: > > > > describe "some behavior" do > > > > __it "should work do > > > > __#... > > > > __end > > > > end > > > > > > > > is what "I" like to have > > It is from netbeans 7.0 auto formatting This still sounds odd to me. Ruby formatting in

Re: indenting contnued line

2013-05-24 Thread Ben Fritz
On Friday, May 24, 2013 7:03:34 PM UTC-5, rudrab wrote: > Hello friends, > for a continued line, say, in C, > void some_function(argument1, > more_arg) > > is the natural behavior of vim (with my current vimrc). > I want it to be like > void some_function(argument1, >more_arg)

Help with indenting code

2021-03-10 Thread Lifepillar
I would like to indent code structured as follows: if X then ( if Y then ( ... ) ) else ... To make Python look like a language that is easy to indent, this language has `if... then... [else]` blocks without `endif`. I get can get

Indenting behavior leaving blank lines

2008-10-06 Thread pwnb0t
I searched and did not find a valid answer to what I'm trying to do. When I press enter on an indented line (say, line 1), it takes me to line 2 with the proper indentation. If I press enter again without changing line 2, it takes me to line 3 with the proper indentation on line 3, but the probl

Re: indenting blocks inside brackets

2008-10-17 Thread David Lam
put your cursor on the first { then =aB for magic On Fri, Oct 17, 2008 at 9:37 AM, Ben Kim <[EMAIL PROTECTED]> wrote: > > > I think if my previous email didn't get to the list because it had a > redirection character (angle bracket) in the subject. > > I have this question regarding >% or <%. >

Indenting with intervening blank lines

2009-02-12 Thread Ben Schmidt
Hi, guys, I refer people to this tip which I recently updated with a script that is newer and much better than the earlier one. I thought it was a new tip, but it seems not to be now. Not sure whether that's because it was accepted (prematurely in my opinion), or just that it actually never w

Problem with indenting ruby code

2009-12-13 Thread Tuo Pe
Something's wrong with ruby indentation settings. When I use snippets (if snippet in this case), I get if <{condition}> __<{}> __end __<{}> How do I get "end" and the last "<{}>" to indented correctly? Much oblige! Tuo -- You received this message from the "vim_use

indenting wrapped lines in XML

2010-01-05 Thread Jim Deverick
I've been struggling to figure out how to modify the indentation behavior for XML files when attributes are continued among multiple lines. Here's a summary of what I'd like to see: with two-space indenting, I'd like to have a wrapped line (attr3 and attr4) in

Re: argument list auto-indenting

2010-01-07 Thread Ben Fritz
On Jan 6, 1:27 am, chardson wrote: > Greetings all, > > I've been searching hard, but not finding terribly useful results for > the following problem.  The problem is this: most of my labmates use > emacs and specific java formatting rules (simple in emacs).  I need to > duplicate said rules (an

Re: argument list auto-indenting

2010-01-07 Thread chardson
Ah, I saw that but didn't look carefully enough. I'll try and post the solution when I figure it out Thanks much On Jan 7, 11:31 am, Ben Fritz wrote: > On Jan 6, 1:27 am, chardson wrote: > > > > > Greetings all, > > > I've been searching hard, but not finding terribly useful results for > >

Re: argument list auto-indenting

2010-01-11 Thread chardson
I've spent a fair amount of time reading and playing with cinoptions, which has solved some of my problems My cinoptions are now "l1,(0,u0,j1" The result, then, is http://i.imgur.com/AYmcS.png http://i.imgur.com/nqWuk.png I haven't managed to find a solution for the nested {} list (mat

Re: argument list auto-indenting

2010-01-12 Thread Ben Fritz
a while. It may be helpful as a starting point, but no guarantees: ==$HOME/vimfiles/after/indent/c.vim=== " special indenting (indent to the unmatched paren or bracket) " autoload only supported in version 7 and above if v:version>=701 let s:comment_text = '^\s*\*.*\|//.

Re: argument list auto-indenting

2010-01-12 Thread Ben Fritz
=$HOME/vimfiles/after/indent/c.vim=== > " special indenting (indent to the unmatched paren or bracket) > " autoload only supported in version 7 and above > if v:version>=701 >   let s:comment_text = '^\s*\*.*\|//.*\|/\*\%(\%(\*/\)\...@!

Possible bug in indenting behavior

2011-04-19 Thread Randy Morris
Greetings, I may have found a bug in indenting behavior depending on whether or not 'list' is set. Can someone try to reproduce and/or explain what is happening if it's not a bug? test.vim: set noet ts=8 sts=4 sw=4 list vim -u test.vim: (type exactly the following

Re: perl: indenting references (\@arr)

2011-10-31 Thread Andy Wokula
Am 30.10.2011 20:34, schrieb Ronald: It seems as '[(){}\[\]]' finds brackets 'and' backslashes! Yes. How it reads with spaces: [ ( ) { } \ [ \] ] :h /\] | To include a literal ']', '^', '-' or '\' in the collection, put a | backslash before it BUT | For '\' you can also let it be fol

Fortran indenting and preprocessor directives

2012-02-13 Thread Fabio Affinito
Hi all, I'm using VIM to indent a Fortran code. My problem is that VIM indent the proprecessor directives too. This causes errors in compilation. Do you know how can avoid to indent the lines starting with # ? The following is my .vimrc file: set nocompatible set mouse=a set hidden set viminfo+

Fortran indenting and preprocessor directives

2012-02-13 Thread fabioaffinito
advance. Fabio -- View this message in context: http://vim.1045645.n5.nabble.com/Fortran-indenting-and-preprocessor-directives-tp5478921p5478921.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!

indenting python docstring in vim

2012-04-03 Thread Zetah Ghamin
Hi, I am having problem indenting python doctring in vim. Since I use pycontract, a typical docstring looks like the following in which I would like the left side to be aligned: def magic(x, y): '''this function does magic with x and y :param x: the x factor (I

Indenting Based on Unbalanced Paranthesis

2012-11-29 Thread Danny Gratzer
I am writing an indentation script for a simple language. The language is has very simple constructs and the indentation really only has 3 rules: 1. A comment has goes from a // until a newline, anything in a comment should be ignored. 2. If the line above contains a semi-colon, the indentation s

Re: perl: indenting references (\@arr)

2013-01-05 Thread Rgg
ectly. Ronald -- View this message in context: http://vim.1045645.n5.nabble.com/perl-indenting-references-arr-tp4950945p5712944.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

7.4 html javascript indenting issues

2013-11-01 Thread David Fishburn
I am using: 7.4 1-52 The standard vim74/indent/html.vim (version 0.9) I have the following defined in my .vimrc let g:html_indent_inctags = "body,html,head,p,tbody" let g:html_indent_script1 = "inc" let g:html_indent_style1 = "inc" When I indent this entire file, I get these results: ***

Re: Indenting behavior leaving blank lines

2008-10-06 Thread Anton Sharonov
IIUC, you should use :setlocal noexpandtab or, if you prefer it in every file you can :set noexpandtab in your ~/.vimrc Please, read this as well: :help set :help setlocal :help expandtab Anton. 2008/10/6, pwnb0t <[EMAIL PROTECTED]>: > > I searched and did not find a valid answer to what

Re: Indenting behavior leaving blank lines

2008-10-06 Thread Gary Johnson
On 2008-10-06, Anton Sharonov <[EMAIL PROTECTED]> wrote: > 2008/10/6, pwnb0t <[EMAIL PROTECTED]>: > > > > I searched and did not find a valid answer to what I'm trying to do. > > > > When I press enter on an indented line (say, line 1), it takes me to > > line 2 with the proper indentation. If I

Re: Indenting behavior leaving blank lines

2008-10-06 Thread Ben Schmidt
pwnb0t wrote: > I searched and did not find a valid answer to what I'm trying to do. > > When I press enter on an indented line (say, line 1), it takes me to > line 2 with the proper indentation. If I press enter again without > changing line 2, it takes me to line 3 with the proper indentation

Re: Indenting behavior leaving blank lines

2008-10-07 Thread pwnb0t
Gary, you explain my situation correctly. I actually don't mind it deleting the spaces because I can press S on a blank line and it will correctly put in the spacing I want, but if anyone else edits my files (in Eclipse), they have to tab all of the blank lines over. > See here: > http://groups

Re: Indenting behavior leaving blank lines

2008-10-07 Thread pwnb0t
> Well, what about ":set cpo+=I" Wow, can't believe this. On one machine that I ssh in to, it has vim 6.4. So on that one, I had tried ":set cpoptions+=I" and received an error so I thought that option was invalid. I also looked at the built-in docs (and it's usually the first place I go to) t

Re: Indenting behavior leaving blank lines

2008-10-07 Thread Tony Mechelynck
On 07/10/08 23:03, pwnb0t wrote: > Gary, you explain my situation correctly. I actually don't mind it > deleting the spaces because I can press S on a blank line and it will > correctly put in the spacing I want, but if anyone else edits my files > (in Eclipse), they have to tab all of the blank

Re: Indenting behavior leaving blank lines

2008-10-22 Thread pwnb0t
Alright, I said it worked, but then I haven't used vim since. Now I'm back to using it and ":set cpo+=I" does not seem to work I have tried several combinations of enabling and disabling autoindent, smartindent, and cindent to see if that would do anything I am using Vim 7.2 on a Mac (installed

Re: Indenting behavior leaving blank lines

2008-10-23 Thread Jürgen Krämer
Hi, pwnb0t wrote: > Alright, I said it worked, but then I haven't used vim since. > > Now I'm back to using it and ":set cpo+=I" does not seem to work > I have tried several combinations of enabling and disabling > autoindent, smartindent, and cindent to see if that would do anything the 'I'-f

Re: Indenting behavior leaving blank lines

2008-10-23 Thread fritzophrenic
On Oct 23, 2:03 am, Jürgen Krämer <[EMAIL PROTECTED]> wrote: > > the 'I'-flag in 'cpoptions' only keeps the current indent if you leave > the line by pressing cursor-up or cursor-down. If you press enter the > indent is removed. The only working solution I know of is to > >   :inoremap x > > Re

Re: Indenting behavior leaving blank lines

2008-10-23 Thread pwnb0t
The problem with using these maps, inoremap nnoremap o o nnoremap O O nnoremap S S is that using == on a line with only indentation (or gg=G for the whole document, etc...) will remove that indentation. I'm surprised that there is not a simple option to make vim's indentation the same as what

Re: Indenting behavior leaving blank lines

2008-10-23 Thread pwnb0t
This macro works better: /^$\n\+\tokdd On Oct 23, 9:12 am, pwnb0t <[EMAIL PROTECTED]> wrote: > The problem with using these maps, > > inoremap > nnoremap o o > nnoremap O O > nnoremap S S > > is that using == on a line with only indentation (or gg=G for the > whole document, etc...) will remo

Re: Indenting behavior leaving blank lines

2008-10-23 Thread Jürgen Krämer
Hi, fritzophrenic wrote: > > > On Oct 23, 2:03 am, Jürgen Krämer <[EMAIL PROTECTED]> wrote: >> the 'I'-flag in 'cpoptions' only keeps the current indent if you leave >> the line by pressing cursor-up or cursor-down. If you press enter the >> indent is removed. The only working solution I know

Re: Indenting behavior leaving blank lines

2008-10-23 Thread Jürgen Krämer
problem caused by these mappings. Indenting always removes (and re-inserts) spaces at the beginning of a line as necessary. As there is no text to indent spaces are removed. > I'm surprised that there is not a simple option to make vim's > indentation the same as what I would get using Ec

Re: Indenting behavior leaving blank lines

2008-10-23 Thread Jürgen Krämer
Hi, pwnb0t wrote: > This macro works better: > > /^$\n\+\tokdd $ only denotes end-of-line if used at the end of a regular expression. In the above macro it is followed by \n+\t, so you are searching for a line containing only a single dollar sign followed by zero or more blank lines and a tab.

Re: Indenting behavior leaving blank lines

2008-10-23 Thread Matt Wozniski
On Thu, Oct 23, 2008 at 10:12 AM, pwnb0t wrote: > > I'm surprised that there is not a simple option to make vim's > indentation the same as what I would get using Eclipse (or other IDE / > editor). I can conceive of no advantage to adding these extra bytes to the file. It's not uncommon for larg

Re: Indenting behavior leaving blank lines

2008-10-23 Thread pwnb0t
> $ only denotes end-of-line if used I tested that macro and it seems to work as expected I also tested taking out the $ and that works too I agree that the $ should not be in there > Why should Vim keep spaces in otherwise empty lines on indenting? Should > it also *add* space

RE: Indenting with intervening blank lines

2009-02-13 Thread John Beckett
Ben Schmidt wrote: > I refer people to this tip which I recently updated with a > script that is newer and much better than the earlier one. > > I thought it was a new tip, but it seems not to be now. > > Not sure whether that's because it was accepted (prematurely > in my opinion), or just th

Re: Indenting with intervening blank lines

2009-02-13 Thread Tony Mechelynck
On 13/02/09 02:52, Ben Schmidt wrote: > Hi, guys, > > I refer people to this tip which I recently updated with a script that is > newer > and much better than the earlier one. > > I thought it was a new tip, but it seems not to be now. > > Not sure whether that's because it was accepted (prematur

  1   2   >