How can I add a new kateproject to the Kate editor ?
I have created a bookssimple.kateproject file as described here:
http://kate-editor.org/2012/11/02/using-the-projects-plugin-in-kate/
{"name": "books_simple", "files": [ { "directory": "perl", "recursive": 1 } ]}
But how can I tell Kate to use this file ?
The project file must be named .kateproject and NOT bookssimple.kateproject. Then it will work. Just open a file in the respective folder or subfolder, and the projects plugin will automatically find the file .kateproject.
You simply open a file from the directory in question, and kate will automatically load the rest of the project
Related
In Vue.js you have the possibility to use the # in a path file as a shortcut to your src folder. It is nice because all your files have an absolute path.
However I don't manage to find a way to configure WebStorm to understand that and allow me to follow and check if the file exist when using it.
Example :
import Business from '#/components/Business/Business'
Writing that I want WebStorm to tell me if the file does not exists and to allow me to go to that file directly.
I did not manage to find any answer about it and neither managed to find a way to do it in the IDE.
For vue-cli3, you need to specify a full path to node_modules/#vue/cli-service/webpack.config.js as a webpack configuration file in Settings | Languages & Frameworks | JavaScript | Webpack.
Note that this only works for JavaScript; webpack aliases are not resolved when using components written in TypeScript, path mappings in tsconfig.json should be used instead
In phpstorm 2020.3.3, I could fix this by
Opening Settings > Languages & Frameworks > JavaScript > Webpack and choose "Automatically"
Once saved, this opens a popup asking to run webpack configuration. Click "Trust project and run"
Fixed!
Webstorm already supports resolving alias. Webstorm read your webpack.config.js in background.
If you're using vue-cli 3, we don't have webpack.config.js, but you can create webpack.config.js file manually
module.exports = {
resolve: {
alias: {
"#": require("path").resolve(__dirname, "src") // change this to your folder path
}
}
};
webstorm will resolve it automatically
vue-cli3 you can select node_modules/#vue/cli-service/webpack.config.js as webstorm configuration file Settings > Languages & Frameworks > JavaScript > Webpack.
or create webpack.config.js in the root directory, content is
const resolve = dir => require('path').join(__dirname, dir);
module.exports = {
resolve: {
alias: {
'#': resolve('src')
}
}
};
And then as webstorm configuration file.
Today I install sublime text 3.
I install plugin SublimeCodeIntel. This plugin help me for autocomplete functions in php. In my projects I use Yii framework. Can I add yii framework to this plugin.
You should be able to. First, open Preferences -> Package Settings -> SublimeCodeIntel -> Settings-Default, copy the entire contents, open ... -> SublimeCodeIntel -> Settings-User, and paste the contents into it. You can now close Settings-Default.
Scroll all the way down to the bottom and customize the settings in the "PHP" array. Set "php" to the full path to the php or php.exe binary on your system. In "codeintel_scan_extra_dir", add directories to the list of folders you'd like to scan. For example, you could put ["/path/to/project/vendor/yiisoft"], or just ["/path/to/project/vendor"] if you want to include everything in that directory for code analysis.
If you set up a separate Sublime project for each job, you can add this information to your .sublime-project file. With your project open, select Project -> Edit Project, and set it like this:
{
"folders":
[
{
"follow_symlinks": true,
"path": "/home/mattdmo/Development/Client1/site"
}
],
"settings":
[
{
"codeintel_language_settings": {
"PHP": {
"php": "/usr/local/bin/php",
"codeintel_scan_extra_dir": ["vendor"],
"codeintel_scan_files_in_project": true,
"codeintel_max_recursive_dir_depth": 25,
"codeintel_scan_exclude_dir":["css", "img"]
}
}
}
]
}
Paths are relative to the directory where the .sublime-project file is stored. Read the above link and the official docs for more information. If you don't put a certain setting in the project file (for example, the "codeintel_scan_files_in_project" setting), its value will be taken from the user settings you configured above, or the plugin's default settings you opened initially. So, set base values you always use in the plugin's user settings, then just set project-specific things in the project file.
Let's say I have a project (project1) that lives in [solution folder]\project1\. There's no problem adding a new project (project2) in [solution folder]\project2\ and referencing it as a dependency in project1's project.json with the line below:
"project2": ""
However what if I move project2 to a different (file system instead of solution) folder such as [solution folder]\lib\project2\? How do I add the reference in this case?
====================================
Just want to share a new tip:
If you have a project in a subfolder e.g. [solution folder]\lib\project1\ and want to reference another project located in the solution folder e.g. [solution folder]\project2\, make the following change to the global.json:
{
"sources": [""]
}
Add a global.json file to the solution folder with the following text in it:
{
"sources": ["lib"]
}
THT,
Bart
Just getting started with KrakenJS. After running the generator and looking at the config.json I notice it has the "static" middleware defined as:
"static": {
"module": {
"arguments": [ "path:./.build" ]
}
}
I have two issues/questions:
After running grunt build I see the browserify output in the /.build folder, but when I navigate to /js/app.js it appears to load the file from the /public folder. Shouldn't it be from the /.build folder?
With Express 4+ shouldn't this actually be serve-static?
I can't help but think I'm missing something.
Thanks!
As I guessed, I was missing something.
I dug into the kraken source a bit more and found that the core config defines the "name" property on static as "serve-static", so it is in fact correct when it merges with the config.json in my app.
The other issue I was having with loading from the incorrect folder was because inside the development.json config file the 'kraken-devtools' middleware is configured with the copier compiler, so when the file is requested at runtime it copies it from the /public folder into the /.build folder, overwriting the output from grunt build.
I am writing a plugin.
What is the 'right' way to get every folder path in opened project? Should I open and parse project file myself?
What I need is 'folders' section in .*sublime-project
looks like view.window().folders() is what I want