reddit / emacs

Visit a file without using any special modes

worker55 · 2022-08-28 23:55
Is it possible to open a file without using any special modes? I have a rust source code file that bogs down my LSP mode. Can I visit the file without loading any modes so I can quickly edit out the offending contents? **Update**: `find-file-literally` did the trick! Plus, Avy still works. Thank you all!
lebensterben · 2022-08-28 23:59
you need to remove the rust entry from auto-mode-alist and btw, I always keep vim around for this kind of jobs......
alpheus · 2022-08-29 00:19
find-file-literally
thiscarhasfourtires · 2022-08-29 00:57
You can: - `M-x find-file-literally` - add [file-local variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html) that enable or disable whatever you want - add a [dir-locals.el](https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html) file for settings that will be enabled for the entire directory
FrozenOnPluto · 2022-08-29 01:26
You woudl use a non-emacs to edit a file, while using Emacs? Seems crazy talk :O
7890yuiop · 2022-08-29 02:57
Please take note of what this does, as it's *much* more than what was specifically asked for. Refer to `C-h i g (elisp)Visiting Functions`
abdelrahmanbbb · 2022-08-31 01:36
Just M-x term and run vim in there, that way you're still using emacs