-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
How to stop auto indent? #4219
Comments
You can use prefix argument by pressing |
The auto-indent should not happen in python buffers so I suppose you are pasting in a buffer which is not a python buffer. Is it the case ? If yes then @tuhdo answer is the way to go, if no then we have a bug. |
I use emacs in iterm to login in a remote client. so I just use command+v to paste in iterm. |
Auto-indenting is very annoying with Nix code. I've tried using |
System Info
(auto-completion erc emacs-lisp extra-langs eyebrowse fasd git github markdown nixos org ranger search-engine spell-checking syntax-checking version-control) |
+ 1, I experience the same behavior -- pasting in a Python buffer results in the contents of the clipboard being auto-indented beyond recognition. |
+1 I'm pasting a bit of SQL into a SQL file and seeing similar "flattened" results after pasting. I'm in evil mode, trying |
How do I do a "raw paste" in prog-mode? (or any mode in general)
Are the docs outdated / not working? It sure looks like it based on the replies here. (latest develop branch, evil mode) |
I seem to have the same problem in Agda and Nix code. Any pasted lines are indented to the indentation level of the previous non-empty line. Python does no indentation (as wanted). |
Do any spacemacs gurus know the answer? 😉 |
Just curious. I don't use spacemacs nor i-something, but are you all using spacemacs under some terminal emulator? And copy from something and past it on the terminal? If so, emacs can't distinguish pasted enter and key input enter and electric-indent kicks in. What you can do is to disable electric indent with Hope this helps. |
@yashi, no, I'm using graphical Emacs (GNU/Linux). I'm also using Evil's paste, rather than sending keystrokes, so I would be surprised if that were the problem. The problem also occurs with |
I'm also using graphical Emacs (Mac). Can confirm, the problem occurs with electric indent disabled too. |
Same problem here, also GUI, disabling electric indent does not work. Switching to fundamental mode from nix-mode, does help though! :-) yeah! |
I encountered this problem today when working in This is what I added to my (add-to-list 'spacemacs-indent-sensitive-modes 'elixir-mode) |
|
Proposal: replace both with a single working version:
|
With
|
@clhodapp Since you seem to have found a solution, is there any chance you could send a pull request? |
I'm still having this issue |
@aviggiano You can disable auto-indent on p altogether using the (add-to-list 'spacemacs-indent-sensitive-modes 'sql-mode) Just put into your |
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
The auto-indent advice around evil-paste-{before,after} calls the advised funcs without removing the universal argument. This results in errors like: ad-Advice-evil-paste-before: Wrong type argument: number-or-marker-p, (4) and, ultimately, in the paste failing. This checks for the universal argument *before* calling the advised funcs, adjusting the args to remove the universal argument. Fixes syl20bnr#4219 Fixes syl20bnr#8897
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
This commit fixes syl20bnr#4219 and fixes syl20bnr#8897
I want to copy a pice of python code into emacs. But emacs makes it automatically to indent to make my code a mess. How can I solve the problem?
The text was updated successfully, but these errors were encountered: