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

on_cr fully in insert mode! #402

Closed
wants to merge 3 commits into from
Closed

on_cr fully in insert mode! #402

wants to merge 3 commits into from

Conversation

Sam-programs
Copy link
Contributor

after carefully reading most of indent.txt

i found a way to make Return expansion work fully in insert mode with keys,
using cinkeys and indentkeys

={motion}   Filter {motion} lines through the external program
			given with the 'equalprg' option.  When the 'equalprg'
			option is empty (this is the default), use the
			internal formatting function |C-indenting| and
			|'lisp'|.  But when 'indentexpr' is not empty, it will
			be used instead |indent-expression|.

i replicated in insert everything except for equalprg as am not sure how it can be helpful, since we are only indenting 1 line

i also changed the way pairs are placed

     {

|} format

     {
| format to set the cursor position
     }

@Sam-programs
Copy link
Contributor Author

how should i go about undo blocks ?
old me made it have no undo blocks for endwise pairs
and have undo blocks around none-endwise pairs
i feel like i should have undo-blocks around in both cases
because expanding a pair is it's own operation

@Sam-programs
Copy link
Contributor Author

the indenting is a bit unstable with ctrl-f when a pair is under the cursor i am gonna close this

@Sam-programs
Copy link
Contributor Author

Sam-programs commented Oct 29, 2023

nvm the flickering issues are related to neovim and lualine.

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

Successfully merging this pull request may close these issues.

1 participant