google / ci_edit

A terminal text editor with mouse support and ctrl+Q to quit.
Apache License 2.0
223 stars 54 forks source link

How to remove auto-indentation? #219

Closed IvanAli closed 4 years ago

IvanAli commented 4 years ago

In particular, I have this habit of mine of pressing "space space" after I enter a new line. Is it possible to disable the two-space auto-indentation?

dschuyler commented 4 years ago

First, thanks for asking! Second, there wasn't an easy way (there was a very involved, non-easy way :) )

The new easy way is:

  1. update your ci_edit and run install.sh again.
  2. Add to your prefs: Open the editor.json preferences file: $ we ~/.ci_edit/prefs/editor.json and paste:
    {
    "autoIndent": false
    }

(oh, and if yo already have other prefs set, then just add another entry for "autoIndent".)

dschuyler commented 4 years ago

Whoops, when I first wrote that I had "autoIndent": true which turns indent on (which is the default). It should be "autoIndent": false to turn it off.

IvanAli commented 4 years ago

Thanks for looking into this!

This is close to the behavior I want. To be more precise, For a given indentation already set, after I press enter to start typing in the next line, the same indentation is kept in this new line, as opposed to complete removing it.

This feature probably has a different name than "autoIndent" though.

Thanks :)