Comments (8)
In that case you should either just disable electric-pair-mode
(see init-editing-utils.el
) or get in the habit of using one of the tricks I described above.
from emacs.d.
Thank you for the help, I will use the tricks!
from emacs.d.
It sounds like you're using your own config and wondering why the behaviour is different from mine?
If so, this behaviour could be affected by a number of things, and it's hard for me to speculate. Probably the code that's inserting the extra quote is electric-pair-mode
. If that mode is disabled, then this could be a behaviour of the auto-completion framework, which may or may not be the same one I'm using.
It might also depend on the language major mode for the buffer where you're seeing this.
So perhaps provide a bit more info and I'll give you some pointers if I can.
from emacs.d.
Hi, I just cloned your repo, replace it with my old .emacs.d folder, kept all your code untouched, and created my own init-local.el file as follows:
;;; package --- my personal config
(setq-default cursor-type '(bar . 6))
(set-cursor-color "#FFFF00")
(global-set-key (kbd "C-<tab>") 'set-mark-command)
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
(load-theme 'hardhacker t)
(setq flymake-start-on-flymake-mode nil)
(elpy-enable)
(require 'use-package)
(require 'quelpa-use-package)
(use-package copilot
:quelpa (copilot :fetcher github
:repo "zerolfx/copilot.el"
:branch "main"
:files ("dist" "*.el")))
;; you can utilize :map :hook and :config to customize copilot
(add-hook 'prog-mode-hook 'copilot-mode)
(define-key copilot-completion-map (kbd "<tab>") 'copilot-accept-completion)
(define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion)
(provide 'init-local)
I also installed some packages like elpy
and user-package
(because I can't enable the autocompletion for python mode and I want to use copilot). Does that make a difference?
from emacs.d.
I also installed some packages like elpy and user-package (because I can't enable the autocompletion for python mode and I want to use copilot). Does that make a difference?
Probably nothing there makes a difference. You can try disabling electric-pair-mode
and see if that helps. You can also use C-h k "
to check that there's no special override for that character (it should normally be bound to self-insert-command
).
from emacs.d.
You could use paredit-mode and use C-)
to slurp after the quotes.
"|"John
becomes
"|John"
Usually used for lisp languages though.
from emacs.d.
@psyconorlogy Yeah, and I'm in the process of adding puni
to my config, to provide some Paredit-style structural editing support in non-Lisp buffers. But what I actually do in the above case is select the John
, then hit "
, which has the result of quoting the word to "John"
. You can also use C-q
to disable any magic when inserting a char, so if there are certain occasional misbehaviours you can recognise those situations and work around them with C-q "
or C-q (
etc.
from emacs.d.
@purcell I just deleted my .emacs.d folder, cloned your repo again and kept everything untouched, and it still autocompletes the quotes as before. I'm using ubuntu 22.04 and installed the snap version emacs (28.2).
from emacs.d.
Related Issues (20)
- mc/mark-next-like-this not working HOT 2
- Lost fringe indicators left window HOT 1
- presses one key to turn into many keys HOT 7
- About flymake-flycheck HOT 10
- Got error message, about function of sanityinc/make-read-only, pp-display-expression in .el file in emacs 29.0.60 HOT 3
- Won't load after init-local.el is created and/or removed HOT 2
- Using wdired to change file name, got error message. HOT 6
- projectile configuration make projectile's candidate display error in emacs 29 HOT 3
- support for copilot HOT 2
- keybinding issues with paredit HOT 4
- Multiple Python flymake checkers HOT 4
- treesit config not load on startup HOT 1
- treesit-extra-load-path error when start emacs HOT 14
- Emacs says Symbol's function definition is void: setopt after updated to the latest version HOT 3
- Warning (treesit): Cannot activate tree-sitter, because language grammar for nix is unavailable (not-found) HOT 1
- Question on combining `eglot` + `nix` + `poetry` HOT 5
- symbol flymake-ruff-program is not bound
- M-X sly hits Error running timer: (void-function set-up-sly-hippie-expand) HOT 1
- Tidying up code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs.d.