text-editor

How to call VS Code Editor from command line

北城余情 提交于 2019-11-27 17:19:18
The question says it all. How can I call VS Code editor from windows cmd linux and mac terminal e.g. for notepad++ I write > start notepad++ test.txt By the way, the editor is awesome (cross-platform)! Thank you Nadella! You can download it from microsoft Laily Use the command code /path/to/file/or/directory/you/want/to/open to open your file in VS Code. On Windows and Linux the code command should be installed automatically. On macOS, it needs to be installed manually: Launch VS Code. Now open the Command Palette (F1) and type shell command to find the Shell Command: Install 'code' command in

Text editor theory [closed]

泪湿孤枕 提交于 2019-11-27 16:50:31
As I'm always dissatisfied with existing editors, a project I always wanted to start is my own text editor. However doing text editing is serious business. Besides analyzing the source code of existing text editors, is there any book or other resource (like academic work) about this topic? I'm interested especially in something that teaches how to handle memory and how to manage text insertion (if you have a 100 MB file and want to add a char at x position, you can't just memmove the huge text block...). Take a look at Rob Pike's description of his Sam text editor . Be sure to browse past the

What is the difference between MacVim and regular Vim?

天大地大妈咪最大 提交于 2019-11-27 16:38:10
I'm reasonably new to OS X, but I'm familiar with Vim from using it in various *nix systems. I've seen many people recommend running MacVim over Vim in the terminal. Can anyone tell me what differences there are between MacVim and regular Vim? romainl MacVim is just Vim. Anything you are used to do in Vim will work exactly the same way in MacVim. MacVim is more integrated in the whole OS than Vim in the Terminal or even GVim in Linux, it follows a lot of Mac OS X's conventions. If you work mainly with GUI apps ( YummyFTP + GitX + Charles , for example) you may prefer MacVim. If you work mainly

Read in text file line by line php - newline not being detected

允我心安 提交于 2019-11-27 10:19:14
问题 I have a php function I wrote that will take a text file and list each line as its own row in a table. The problem is the classic "works fine on my machine", but of course when I ask somebody else to generate the .txt file I am looking for, it keeps on reading in the whole file as 1 line. When I open it in my text editor, it looks just as how I would expect it with a new name on each line, but its the newline character or something throwing it off. So far I have come to the conclusion it

Is it worth investing time in learning to use Emacs?

最后都变了- 提交于 2019-11-27 10:10:25
Right up front: I do not want to start a religious war. I've used vi for as long as I can remember, and the few times I've tried to pick up Emacs I've been so lost that I've quickly given up. Lots of people find Emacs very powerful, however. Its programmability is somewhat legendary. I'm primarily doing Solaris+Java development, and I'd like to ask a simple question: will my productivity increase if I invest time in getting my head around Emacs? Is the functionality that it offers over Vim going to be paid back in productivity increases in a reasonable timeframe? Repeat: I don't want a "my

Multiple select in Visual Studio?

落爺英雄遲暮 提交于 2019-11-27 09:56:50
问题 Is there a way to select multiple non-adjoining (totally separate) texts in VS? I can do it in MS Word by selecting the texts separately by holding the Ctrl button, like this: My version is 11. Edit: I'm not talking about Alt+Select block selection. Also I would love to see if there exist a technique in Notepad++. 回答1: Multi cursor edit is natively supported in Visual Studio starting from version 2017 Update 8. Here is the documentation: Multi-caret selection and here is a screenshot of

Edit a text file on the console in 64-bit Windows

流过昼夜 提交于 2019-11-27 09:55:39
问题 I'm trying to figure out the easiest way to edit text files in the console (PowerShell in my case). I'm using Windows 7 64 bit. It galls me that I can't just type edit filename.txt to edit a file. That used to work, but that's all changed. What are my options to view and edit text files within the windows console, and if you tell me to install and learn VIM I'm going to punch you in the face. :-) 回答1: Kinesics Text Editor. It's super fast and handles large text files, though minimal in

Why use monospace fonts in your IDE? [closed]

你说的曾经没有我的故事 提交于 2019-11-27 09:49:01
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I've seen a couple of font topics on SO and it seems a majority of people use monospace fonts for programming tasks. I have been using

Filtering text through a shell command in Emacs

荒凉一梦 提交于 2019-11-27 09:23:11
问题 In vi[m] there is the ! command which lets me pipe text through a shell command -- like sort or indent -- and get the filtered text back into the buffer. Is there an equivalent in emacs? 回答1: You can select a region and type `C-u M-| command RET', and it replaces the region with the command output in the same buffer due to the interactive prefix argument of shell-command-on-region. 回答2: I wrote this a few years back, it might help you: (defun generalized-shell-command (command arg) "Unifies

How to edit multi-gigabyte text files? Vim doesn't work =( [closed]

半城伤御伤魂 提交于 2019-11-27 06:04:20
Are there any editors that can edit multi-gigabyte text files, perhaps by only loading small portions into memory at once? It doesn't seem like Vim can handle it =( Al pacino If you are on *nix (and assuming you have to modify only parts of file (and rarely)), you may split the files (using the split command), edit them individually (using awk , sed , or something similar) and concatenate them after you are done. cat file2 file3 >> file1 Aaron R. Ctrl-C will stop file load. If the file is small enough you may have been lucky to have loaded all the contents and just killed any post load steps.