sublimetext3

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

Sublime Text 3 not printing correctly

白昼怎懂夜的黑 提交于 2019-12-11 15:23:25
问题 I have the following code: if __name__ == '__main__': player_information = get_information() print "Goalkeepers top 10:" goalkeepers = get_position(player_information, "Goalkeeper") for player, points in get_top_players(goalkeepers, 10, 5): print goalkeepers[player]["name"], points print "\nDefenders top 10:" defenders = get_position(player_information, "Defender") for player, points in get_top_players(defenders, 10, 5): print defenders[player]["name"], points print "\nMidfielders top 10:"

Unmap ctrl+space in Sublime Text 3

时光怂恿深爱的人放手 提交于 2019-12-11 13:34:26
问题 On OS X, I have ctrl+space mapped systemwide to "Help...Search". However, in Sublime Text 3, the default for ctrl+space is auto-complete. In Sublime Text 2, I was able to edit the default keymap and just delete it, but it seems like you can no longer edit the default keymap anymore. Is there any way in Sublime Text 3 to "undefine" a keymap so that Sublime will allow the operating system wide shortcut to take effect instead? 回答1: Go to /Applications , left-click on Sublime Text.app , and

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

SublimeLinter SCSS-Lint Not Linting?

孤者浪人 提交于 2019-12-11 11:36:20
问题 With SublimeLiner debug set to on, I see this in the console that makes it appear the linter is loaded: SublimeLinter: scss activated: /Users/bob/.rvm/gems/ruby-2.0.0-p247@rails3/bin/scss-lint scss-lint is in fact in that directory. But I see this when a .scss file is edited: SublimeLinter: scss: _layout.scss ['/Users/bob/.rvm/gems/ruby-2.0.0-p247@rails3/bin/scss-lint'] SublimeLinter: scss output: /Users/bob/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:296:in

how to pass dynamic argument in sublime text 3?

孤者浪人 提交于 2019-12-11 11:04:23
问题 for eg : if I want to install npm package through keyboard shortcut in sublime text by selecting the text then every time the argument will be the one that I selected(using mouse/keyboard) before using keyboard shortcut to trigger. 回答1: You could use the sublime-text-shell-command plugin. According to the documentation, the following should do exactly what you want: [ { "keys": ["ctrl+enter"], "command": "shell_command", "args": { "command": "npm install", "region": "arg" } } ] 来源: https:/

Creating a specific Sublime Text's snippet, using Regular Expressions

徘徊边缘 提交于 2019-12-11 10:57:25
问题 Context I have a process that envolves creating similar file/filename structures that have inside of it the name of itself, and things like that, i do this every day, and i see that is repetitive and have a pattern, then i got the idea of creating a Sublime Text's Snippet to generate the code for me, adding a significant improvement on my performance. Example There is a example of a complete "model" using the structure that i said: Ext.define('App.model.geral.layouts.Layouts', { extend: 'App

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