sublimetext3

How to run a lua file in cmd from Sublime Text 3?

雨燕双飞 提交于 2019-12-08 07:44:50
问题 I want to run lua files in cmd (for a reason I can't use build system). How can I do this? 回答1: Since you just want to call a cmd command you can easily write your own plugin. Just open your user directory and create a python file (e.g. run_lua.py ). Or just go with Tools >> New Plugin. This plugin runs the command lua $file and afterwards pauses until the user pressed a key: import subprocess import sublime_plugin class RunLuaCommand(sublime_plugin.WindowCommand): def run(self): view = self

Sublime Text 3 Git Gutter not working

北战南征 提交于 2019-12-08 07:41:29
When I first installed GitGutter, it kept saying that it needed Git and the path specified. I first moved the Git in the same folder, but then I decided to switch to its original folder and specified the path in the environment variable. It stopped showing the error message, but it is still not working. Why is it not working? Here is what I have tried: This is the repository that I created: https://github.com/GroxTheProgrammer/concerning-git-gutter . I then downloaded the zip. Here is before I add a bunch of spaces: This is after I add the spaces: As you can see, GitGutter does not display

Can't build even a simple program in Sublime Text 3

删除回忆录丶 提交于 2019-12-08 07:20:50
问题 I have just switched from Python to C++ for implementing Data Structures and Algorithms. I found that Sublime Text 3 was quiet powerful. I installed it, added my Mingw-64 compiler to the path and also added a "build system". I hoped it would be suffice to build and run any basic C++ program. But when I run #include <iostream> using namespace std; int main() { int n; cin>>n; cout<<n<<endl; return 0; } I know, there is some problem either in the build part or the compiler settings. I tried

How to highlight calls to object methods and user-created functions? (SublimeText, python)

こ雲淡風輕ζ 提交于 2019-12-08 06:46:19
问题 I tried using both Python3/PythonImproved .tmLanguage syntaxes, but neither does this for some reason. Are those actually supposed to be the same color as variables in most editors? Here's a screenshot of some random function: And here's how I want it to look like: To sum it up I just want everything called with parentheses like function() or an object.method() to be highlighted. 回答1: I'm the author of Python Improved. Sublime's default Monokai theme lacks the ability to highlight many of the

No suggestions when code snippets are used in sublime

强颜欢笑 提交于 2019-12-08 06:28:08
问题 For example, when i type i suggestions come with if statement. And I press tabs for selecting if snippet. i get this. if(condition) { // code... } But inside this snippet I no longer get any suggestions. I have to type everything. Why is this happening? Please help. 回答1: Autocompletion inside snippets is disabled by default. You can enable it by changing the value of the auto_complete_with_fields preference to true : // Controls if auto complete is shown when snippet fields are active. //

Build system of Sublime Text 3 executes a different version of PHP

Deadly 提交于 2019-12-08 05:48:24
问题 I am using SublimeText3 on OSX. The problem is: If I execute PHP script on SublimeText3, then it is executed by PHP 5.5. But if I execute the same script from shell (iTerm), then it is executed by PHP 7. How can I execute a script with PHP7 on SublimeText3? The build system is following. { "cmd" : ["php", "$file"], "file_regex": "php$", "selector" : "source.php" } And the PHP script is just: <?php phpinfo(); ?> 回答1: Specify the absolute path to the command (cmd). Let's say $file is /path/to

How do I run gfortran code from sublime text?

不打扰是莪最后的温柔 提交于 2019-12-08 04:50:42
问题 I have a Fortran 95 code which I compile and run on my Linux OS through the terminal window, by first compiling the individual modules and then the main program. Now I am trying to run the same code from sublime text version 3.0, without using the terminal window. I got the motivation from this video: https://www.youtube.com/watch?v=_eZyTNthJG4 But when I ctrl+b , build the code, it gives the following console output: /tmp/cc4nYhyn.o: In function `MAIN__': problem_main.f95:(.text+0x2e5):

Sublime Text 3 Git Gutter not working

那年仲夏 提交于 2019-12-08 03:30:44
问题 When I first installed GitGutter, it kept saying that it needed Git and the path specified. I first moved the Git in the same folder, but then I decided to switch to its original folder and specified the path in the environment variable. It stopped showing the error message, but it is still not working. Why is it not working? Here is what I have tried: This is the repository that I created: https://github.com/GroxTheProgrammer/concerning-git-gutter. I then downloaded the zip. Here is before I

SublimeLinter with C++11

偶尔善良 提交于 2019-12-08 03:27:56
问题 I've started using Sublime Text 3 as my code editor for C++ and I installed some additional packages, two of which being SublimeLinter and SublimeLinter-contrib-clang. Everything seems to be working fine, except that it looks like there is no support for C++11 in the linter. Do you know how I could change that to work with C++11? 回答1: According to the SublimeLinter-contrib-clang troubleshooting guide, it can sometimes has issues finding the C++ standard library headers (see bullet 3). If that

Red lines coming up after strings in SublimeREPL (python)?

二次信任 提交于 2019-12-08 03:10:26
问题 In writing a simple python application, I'm printing out some strings to the console in SublimeREPL (for python), using Python 2.7.8 and Sublime 3, 64 bit for Windows 8.1. However, I'm getting some very annoying red lines after each of the strings that I'm printing. Does someone know why this is happening? I would appreciate any help. Thanks! 回答1: The apostrophe ' character is causing Sublime's syntax highlighting engine to think that you're beginning a single-quoted string. Since ending a