Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to indent beginning of paragraph #69

Open
rebelot opened this issue Apr 5, 2018 · 5 comments
Open

unable to indent beginning of paragraph #69

rebelot opened this issue Apr 5, 2018 · 5 comments

Comments

@rebelot
Copy link

rebelot commented Apr 5, 2018

Yeah... that's it. awesome, until I realized I have to toggle Pencil off, indent paragraph and not touch it with pencil on ever again or it will indent the whole block.

Perhaps I am missing something, but the core functionality of this plugin is also preventing something very common such as paragraphs first line indentation.

of course w/ softwrap this behavior is understandable, since what I see as many lines are in fact a single long wrapped line, and indenting it as a block is fair. This makes no sense although with hard wraps set, since every line is a damn standalone line and I wish I was able to modify the beginning of a line with spaces without seeing all the lines after it becoming indented..

EDIT: allow me to rephrase
how do I retain this plugin auto formatting functionality with the possibility of adding white spaces at the beginning of a paragraph without indenting the following "hard-wrapped" lines?

EEDIT: your plugin is awesome, I had issues figuring out the problem was the autoindent option...

@kimfucious
Copy link

Hey, @rebelot how'd you get that working, anyhow?

@rifuso
Copy link

rifuso commented Oct 27, 2019

I'm also not able to have indented first lines of a paragraph. I've tried setting each of these in turn but have had no luck:

:setlocal noautoindent
:setlocal nocindent
:setlocal nosmartindent
:setlocal indentexpr=

Any suggestions would be appreciated.

@wpwilber
Copy link

wpwilber commented Jan 22, 2020

I'm having the same issue as the last two comments and have had no luck using correcting it using the autoindent option.

EDIT: For anyone still looking for a solution I've had success with
:set nobreakindent

This allows for first line indents in softwrapped text while in vim-pencil.

@alerque
Copy link
Member

alerque commented Jan 23, 2020

@wpwilber Is that the solution or is that a hack? Is that setting something vim-pencil should be enabling internally all the time do you think?

@wpwilber
Copy link

wpwilber commented Jan 23, 2020

For my use the only inconvenience was in determining which setting was causing the unwanted formatting, since the breakindent option doesn't seem to be commonly used. If a list of formatting options enabled by vim-pencil was listed somewhere obvious it might have saved me some frustration.

If anyone finds this while trying to configure vim-pencil to allow first line indents with soft wrapped text, you need to set noautoindent as well as nobreakindent together each time pencil starts for best results. I put a function in my .vimrc that starts pencil and sets both options when I enter Goyo.

function! s:goyo_enter()
    Limelight
    Pencil
    set nobreakindent
    set noautoindent
endfunction

function! s:goyo_leave()
    Limelight!
    PencilOff
endfunction

autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()

Might be useful to someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants