tpope / vim-fireplace

fireplace.vim: Clojure REPL support
https://www.vim.org/scripts/script.php?script_id=4978
1.75k stars 139 forks source link

Vim automatic formatting no longer working as expected #295

Closed gws closed 7 years ago

gws commented 7 years ago

I'm not 100% sure how to report this, but I've noticed some annoying behavior since the recent commit https://github.com/tpope/vim-fireplace/commit/2193122e13fdf9e9af30475d8d9a90746234c1d8

Before that commit, suppose I was editing the following form:

(defn test
  []
  "I am writing a comment here and my cursor is here:[]"
  )

Once I reached my textwidth (I will include this below), the code would either wrap correctly or not wrap at all depending on my settings, and I was OK with either behavior. But since the commit I specified above, as soon as I hit my textwidth, the cursor wraps to the beginning of the same line which results in a mangled line for a few characters until I realize what happened. I used a comment as an example of something I was editing above and will again below, but the described behavior occurs with any text.

Here's an ASCII illustration of the result of the problematic behavior (again, the cursor is represented as a [] where it shouldn't be in a well-formed Clojure file):

(defn test
  []
t[]  "I am writing a comment here and we'll pretend I hit my text limi"
  )

My Vim version is 8.0.0197 and while editing Clojure files, my configuration ends up containing the following options at runtime:

Let me know what other information I can share to help you reproduce this if the above is inadequate.

gws commented 7 years ago

@tpope Works again over here, thank you very much! :heart: