So I have a file I open using emacs with 1000+ lines that contains columns of data. Is there a way to highlight everything (all lines) in the file so that I may copy and paste to my internet browser (such as in email)?
You can do Ctrl-x h Meta-w to select everything and copy it.
Ctrl-x h selects everything, and Meta-w will copy whatever is selected.
Meta+x mark-page you can typically also use Ctrl+x Ctrl+p to select the page
followed by
Meta+w
to copy the marked region, in this case the entire page.
Related
Sometimes I want to paste some text into a file and then immediately operate on it. For instance, to comment-out everything I pasted.
In Emacs, pasting updates Point and Mark. Is there an equivalent in VS Code?
In the extension Select By v0.12.0 I have added a command that pastes the clipboard content and keep it selected.
The command is Paste clipboard and select (selectby.pasteClipboard)
I am trying to copy a column from a text file to another with emacs.
I select the text with C-x, r, r, and then try to copy the same in another text with C-x,r,l + Enter. However, at the end it says: Register does not contain text. Is it because I am trying to copy from one file to another?
My crystal ball suggests that maybe you're copying from two different Emacs sessions. Registers only work within a single Emacs session.
Imagine you have these files in your project:
a/b/first.png
a/first.png
If I trigger projectile with C-c p f and write first.png, and I write first.png , it will show me both files. Is there a way to select the next file?
Example:
In the image below, the first file in the list is .document. Without writing any other letter, is it possible to switch through the list provided by projectile? Is there a combination that will cycle through those file names, like , press some key combination and then .gitignore is selected?
If I correctly understand, the projectile uses the ido package for file name completions, and other things. The ido (and many other packages) uses the C-s to switch to next file name, and C-r to switch to previous file. See "Using IDO" section in previous link
The keyboard arrow keys will toggle through options as well, and you can then hit enter when the file you want is highlighted next to the text you typed.
I am using Windows 7, EmacsW32 and Emacs23
I am trying to navigate inside a directory whose name has spaces with within Emacs. So, I try to navigate to it in Dired mode by:
C-x d
And then navigate to the directory name with spaces (e.g. My Documents) and the suggestion and auto-complete feature (upon pressing TAB) does not work. How can I navigate to folders and files within such directories without removing spaces?
UPDATE: I tried few other paths with spaces in some directories, and it works. i don't know in which situations it works and fails. It works for Program Files but fails for My Documents.
I am taking a shot in the dark, but unix's case escapes are "\ " and I believe windows does the same.
This may not solve your problem directly.
As you described, I think you may not use ido-mode now. The default tab complete in emacs is weak. Try ido-mode, it is fantastic.
I can't replicate this particular issue, however:
To enter a literal space, type C-qSPC
C-q runs the command quoted-insert which ensures that the next character typed is inserted into the current buffer, which can be useful when the key in question is bound to some function.
The problem is not with folders with spaces in it. The problem is only with My Documents, My Videos and similarly named folders.
When I go in the windows file browser and check the path of the folder My Documents, it appears as C:/..../Documents/...
So, I tried to open Documents instead of My Documents in Emacs and it works. Now I am able to access my files under Documents.
This is in accordance to question Using Emacs to recursively find and replace in text files not already open. I already tried using find-name-dired and also package findr.el. It did open a file where the matching text found, but... how can I go to another file, not this automatically opened file????
Thank you!
This seems like more than one question.
find-name-dired will create a results buffer listing all the files with matching filenames. Use C-h m to see dired-mode's help, and all its key-bindings. RET will open the file at point, o will open the file at point in another window, and C-o will do the same, but leaves you in the Find window (which is convenient if you want to quickly visit several of those files).
findr-search (which is what it sounds like you're using) appears to work more like a tags mechanism. C-h f findr-search RET says that you can navigate to the next match with M-,. This will cycle through the matches in the current file, and then on to the next file as necessary.