After modifying files in Sublime Tutor, how to reset them?
Sublime Tutor
Remove it:
ctrl+shift+p
Package Control: Remove Package
SublimeTutor
Reinstall it:
ctrl+shift+p
Package Control: Install Package
SublimeTutor
Done.
Related
mkdir a-1 && cd a-1
pnpm init
pnpm i eslint --save-dev
code .
I opened this project in vscode on windows 10 and vscode showed these warnings.
Module '.pnpm' is extraneous
Module '#eslint/eslintrc' is extraneous
Module 'eslint-scope' is extraneous
Module 'eslint-utils' is extraneous
Module 'eslint' is not installed
I know this doesn't affect the project, but is there any way to go about hiding this warning.
Open the settings menu (Ctrl+, - Windows / Cmd+, - Mac), and navigate to the Npm: Package Manager field. Change the value in the dropdown to pnpm.
Afterwards, open the command palette (Ctrl+Shift+P, - Windows / Cmd+Shift+P, - Mac) and choose Developer: Reload Window.
My vscode does not detect errors in golang.
Example:
package somepackage
import "fmt"
func f(name string) string {
name = 1
return name
}
This should throw a type error, but it does not. I never get any errors.
My settings.json contains
"go.gopath": "some/path",
"go.vetOnSave": "package",
"go.lintOnSave": "package",
"go.testOnSave": true,
"go.buildOnSave": "package",
"go.coverOnSave": true
I was able to run go: install/update Tools. All tools are installed successfully.
I am also able to run debug a .go file in vscode.
As #pwaterz pointed out, the solution to my problem was to add "go.goroot: /some/other/path".
The reason that vscode was not able to detect errors was, that there are different go versions on my computer. Adding the goroot and running go: install/update Tools solved the problem.
---- Edit: Multiple go versions ----
Had multiple conflicting go versions on my Mac, pulled in via brew. Fixed the problem with a reinstall.
Uninstall go and also run brew uninstall go
Reinstall go
Set environment variables in your .bash_profile or similar. Compare here.
Apply the changes to your profile by running e.g. source .bash_profile
Restart VSCode
In settings.json set "go.goroot": "/usr/local/go"
Run go: Toggle workspace trust space to make sure changes to settings.json are applied (you have to trust your workspace for that)
go: Install/update tools and select all
---- Edit: Incorrect root folder ----
Make sure that you open the root folder of your project and not a sub-folder of your project. That may cause in invalid import paths otherwise
---- Edit: Broken language server ----
Try to run go: restart language server
You may see Error loading workspace
run go mod tidy and try again
In Sublime Text 3, with plugins GoSublime and GoImports installed.
I'm having trouble having goimports run on my file automatically everytime I save.
Here's what I tried :
My GoSublime settings are set to :
{
"env": {"GOPATH": "/home/nicolas/.go", "PATH": "$GOPATH/bin:$PATH" },
//"fmt_cmd": ["goimports"]
}
When I save with these settings, the code gets formatted but imports are not added. Nothing surprising so far.
If I hit ctrl+shift+P then GoImports, imports get added as expected.
Now my problem is, when I uncomment that previous line to have these settings :
{
"env": {"GOPATH": "/home/nicolas/.go", "PATH": "$GOPATH/bin:$PATH" },
"fmt_cmd": ["goimports"]
}
Not only does it not add the imports, but no other formatting gets done anymore.
Any idea where I went wrong ?
I'm using Linux (Ubuntu).
Make sure $GOPATH/bin is in your $PATH (Windows: %GOPATH%\bin goes
in your %PATH%).
Run go get -u golang.org/x/tools/cmd/goimports (you may have to
install mercurial).
Install Sublime Text and GoSublime (or make sure you’ve got the
latest update if it’s already installed).
Open the GoSublime user config/preference file (Mac: ⌘. ⌘5 Windows:
Ctrl+. Ctrl+5). Make sure you keep the command button down for the
whole shortcut sequence.
Make it look like this:
{"fmt_cmd": ["goimports"]}
Source
So, where I went wrong :
I installed GoImports from inside Sublime using Package control > Install package > GoImports. That installed it in the Sublime Packages folder, which was not on my $PATH
What I should have done instead :
Install it using the command go get -u golang.org/x/tools/cmd/goimports. This will install it in your $GOPATH (and $GOPATH/bin should be on your $PATH).
ctrl+. , ctrl+x open margo.go file.
Then uncomment one of golang.GoFmt & golang.GoImports. restart sublime text and try again.
// golang.GoFmt,
// or
// golang.GoImports,
I using ubuntu + sublime text 3207 + Go-1.10 + Gosublime + Goimports-release-1.10. And it works for after I uncomment golang.GoImports.
I've been up all night trying to figure out how to use the interpreter for SublimeREPL for Scheme in ST3. I read here that when you download the package for sublimeREPL it doesn't actually include the interpretor. So I tried moving my version of MIT-scheme into
/Users/Myname/Library/Application Support/Sublime Text 3/Packages/SublimeREPL/config/Scheme
but when I do: Tools --> SublimeREPL --> Scheme --> Scheme
I get:
Error loading syntax file "Packages/sublime-scheme-syntax/Scheme.tmLanguage": Unable to open Packages/sublime-scheme-syntax/Scheme.tmLanguage
has anyone had any experience being able to set up the interpretor for scheme in SublimeREPL in sublime text 3? I am using os x 10.9.2
Thanks!!!!!!!!
I have the same problem. Though I am using Sublime Text 2, my solution might be applicable to you.
The error message refers to the wrong path or directory to the Scheme.tmLanguage file.
In my case, this file is placed at "Packages/Scheme" here, not at the "Packages/sublime-scheme-syntax" folder. I just edit Main.sublime-menu file, change the "syntax": "Packages/sublime-scheme-syntax/Scheme.tmLanguage" line to the correct path and it works!
I found my solution reading this post at SublimeREPL Github site. Hopefully this also works for you.
I have the similar problem and this is how I fix for Sublime Text 2:
install the package "Scheme" through package control.
install the package "SublimeREPL"
install a SCM implementation of Scheme
open Preferences -> Browse Packages ->
SublimeREPL -> config -> Scheme -> Main.sublime-menu. edit the
section with the "id": "repl_scheme"
args:
"windows": ["scm", "-f", "$file_basename"]},
"syntax": "Packages/Scheme/Scheme.tmLanguage"
Thanks to: Sublime Text 2 with MIT Scheme, How to configure SublimeREPL for mit-scheme? and #Yenkaku's answer
Does anyone know how i could use sublime text 2 with scheme. I've heard ST2 and I want to try it out? right now I'm learning scheme. I have the scheme interpreter installed - I can go to the terminal and type in scheme and run code. I can also run the interpreter in emacs, but emacs isn't really fun.
It's probably a little bit late but I'd still like to share my experience...
Now I'm using Sublime Text 2 and using Scheme fine.
First install the package "Scheme" through package control.
Then install the package "SublimeREPL" (for Sublime Text 2).
Then you should have a fully functioning Scheme environment in your Sublime! Syntax highlight is good, and use SublimeREPL for a interactive Scheme prompt.
I wish my answer would help you~
My solution isn't to use Mit-Scheme but DrScheme,and the specific process is as following:
Download PLT-Scheme and install it (http://download.plt-scheme.org/).
Add its installation path to environment variables "Path".
Install the package "SublimeREPL"
Find the file "Sublime Text 2\Packages\SublimeREPL\config\Scheme\Main.sublime-menu",
open with Sublime Text 2. Find the code:
"cmd": {"linux": ["scheme"],
"osx": ["scheme"],
"windows": ["scheme"]},
and change it :
"cmd": {"linux": ["scheme"],
"osx": ["scheme"],
"windows": ["scheme"]},
pic
Save.
Open Sublime Text 2,ctrl+shift+p,and enter scheme,press Enter
Enjoy it!