question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New line after bracket has 8 spaces indentation instead of 4?

See original GitHub issue

After typing the bracket and enter, the next line will has 8 spaces indentation:

            print conn.generate_url(
                    seconds,
                    'GET',

instead of 4:

            print conn.generate_url(
                seconds,
                'GET',

My ~/.vimrc: https://github.com/quantonganh/salt-states/blob/master/vim/vimrc.jinja2

Did I miss something?

Here’s the list of my plugins:

β”œβ”€β”€ ctrlp.vim
β”œβ”€β”€ gundo.vim
β”œβ”€β”€ jedi-vim
β”œβ”€β”€ nerdtree
β”œβ”€β”€ powerline
β”œβ”€β”€ salt-vim
β”œβ”€β”€ supertab
β”œβ”€β”€ syntastic
β”œβ”€β”€ ultisnips
β”œβ”€β”€ vim-fugitive
β”œβ”€β”€ vim-indent-guides
β”œβ”€β”€ vim-surround
β”œβ”€β”€ vim-yankstack
└── vundle

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
blueyedcommented, Jul 27, 2015
2reactions
tndoancommented, Apr 11, 2014

@quantonganh ok. I see.

I think we should add this line in your .vimrc

set autoindent

because you already have filetype plugin indent on

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make vim only insert 4 spaces (one indent level) for ...
After typing the bracket and enter, the next line will has 8 spaces indentation: print conn.generate_url( seconds, 'GET',. instead of 4:
Read more >
IntelliJ does not respect indentation settings of 4 spaces ...
I have set the indentation to 4 spaces. The files in Git are indented with 4 spaces. When I press CTRL+SHIFT+F, the whole...
Read more >
VS Code tips β€” Indentation settings and the ... - YouTube
VS Code shows the indentation settings for the current in the status bar. Click on this entry to quickly change the tab size...
Read more >
Clang-Format Style Options β€” Clang 16.0.0git documentation
We'll use defaults from the LLVM style, but with 4 columns indentation. ... Closing brackets will be placed on a new line. E.g.:....
Read more >
Formatting - Coding Style - Read the Docs
The indentation is 4 spaces. Choose good parameter names. All parameters should be aligned if possible. The open curly brace is always on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found