sublimetext

SublimeText: Run the exec with current file as arg (Tab context menu)

青春壹個敷衍的年華 提交于 2019-12-11 16:01:40
问题 I have created a tab context menu to decode some data. Now, I need to take current file(Tab context menu) as 1st argument to decode this file using exec . Currently I'm using hardcoded path. How can I pass the name of the current file instead? [ { "command": "exec", "args": {"cmd": "P:\\decoder.exe P:\\in.txt"}, "caption": "DecodeJ" }, ] 回答1: Generally speaking there's no way to execute a command and provide to it the name of the currently active file without using some sort of plugin code to

VS Code Keybindings for Select All Inside Tag or Expand selection outwards?

别说谁变了你拦得住时间么 提交于 2019-12-11 14:57:55
问题 Cant seem to find what I am looking for and maybe it doesn't exist yet? I have the sublime text keymap extension installed, but that along with VS Code / Emmet seem to be missing one of my all time favorite sublime shortcuts... Select all inside tags / Expand selection outwards ctrl + , or ctrl + shift + a 回答1: I assume you mean the Expand Selection to Tag command in Sublime? In VS Code the built-in command Emmet: Balance (outward) does basically the same thing. It selects content of a tag

Concflicting Sublime text 2 packages/plugins/snippets

巧了我就是萌 提交于 2019-12-11 14:27:01
问题 Have you ever experienced conflicts/bugs after installing one new package/plugin or snippets on Sublime Text 2 (i.e. conflicting shortcuts)? Note to who down voted the question: it is your right to think it is a question that shouldn't be asked. But, if like me, you have spend a great deal of time trying to find why the plugin you just have properly installed isn't working the way it should then you might reasonably be interested in finding some ressources listing known plugin conflicts. 回答1:

Sublime Text: Hide all code and show only comments

房东的猫 提交于 2019-12-11 13:03:47
问题 I find it tedious to manage very large style sheets in Sublime Text 3. Some of my stylesheets are about 2000 lines of code. I am trying to figure out how to navigate more easily within the stylesheet. I already know about bookmarks and the brilliant search function, but another way would be to hide/fold all code and show comments only. Tis way it would be easier to find the correct place you want to go to. So is there a way to hide all code below a comment? This would be something as the

Custom filetype per file

我只是一个虾纸丫 提交于 2019-12-11 12:14:57
问题 Let's say that i have file /home/foo/myfile without extension. Is there option to add syntax setting into this file? In vim it's :set syntax=javascript . I know that in Sublime you can set default syntax color. There's similar question Changing default syntax based on filename but there you set specific filename. I need to set it in file itself, since i have a lot of different files without extension. 回答1: The package ApplySyntax should be able to do what you want. ApplySyntax is a plugin for

Highlighting JavaScript's dictionary keys in Sublime text

不想你离开。 提交于 2019-12-11 11:44:41
问题 is it possible to get a specific syntax highlight of the keys of the associative arrays written in JavaScript with Sublime text? The following screenshot will illustrate the problem (using Cobalt theme): As you can see, the syntax highlighting of that piece of code is very poor. I would like to get a dedicated color of the object's keys. Is this possible? Syntax highlighting of setting the fields of an object by dot notation is also unsatisfactory: Even in that case the syntax highlighting is

Sublime Text: how to correct SQL Server syntax

不打扰是莪最后的温柔 提交于 2019-12-11 10:56:42
问题 I am new to Sublime Text (version 3) and I am experiencing difficulties to get a proper SQL syntax highlighting. Whenever I am looking at SQL queries, ST considers "#" as comment. For example, here everything beyond # gets greyed out: INSERT INTO #TEST (A,B,C,D) VALUES ('a','b','c','d') I would like to correct this, so I looked around for answers for weeks but none of them works... I started by looking in C:\Program Files\Sublime Text 3\Packages to find the file SQL.sublime-package. I found

Move cursor to start of line with keyboard shortcut in sublime

给你一囗甜甜゛ 提交于 2019-12-11 10:05:50
问题 Sublime text editor When your cursor is at the start of a line how do you jump to the first character. Each time i try (with ctrl + -> ) i jumps past the first word eg: " DB::dosomecoolstuff();" The cursor here jumps to the end of the "B" which is really annoying. I had a look at the ref,: http://docs.sublimetext.info/en/latest/reference/keyboard_shortcuts_win.html No joy as far as i could see 回答1: If you're at the beginning of a line (or actually anywhere in a line), you can press Home and

Sublime Text indentation behavior

百般思念 提交于 2019-12-11 09:57:23
问题 When using HTML syntax mode in Sublime Text, I see what appears to be erroneous behavior. However, I've exhausted Google trying to find any mention of the same issue. The image explains it best: You'll note that in each instance, the cursor starts at the correct location (one tab in from the current tag). However, the indentation immediately shifts to the left when typing begins. I've compared this behavior to Coda and Atom, but neither have this issue. Sublime Text 3 is up to date. The same

Detecting editor exit events in Sublime

 ̄綄美尐妖づ 提交于 2019-12-11 07:47:15
问题 Is there a way to detect editor exit event in Sublime 2? It is not listed in the API reference and I've tried using EventListener.on_close , but that works only for detecting view closing, which is not what I need. I just want to execute something before the editor exits, is that possible? 回答1: There is no way to do this in ST2. In ST3, you could try to capture the exit command by using sublime_plugin.EventListener.on_window_command(), or possibly on_text_command() (not sure what kind of