Spacemacs - is theere a way to use downloaded theme for spacemacs (.el file) - spacemacs

I'm new to spacemacs/emacs. I downloaded an theme file .el and put it in /private/themes dir. (themes dir I created) How can I see it when I hit M-x - load theme ? I read some articles about using add-to list load-path and require but dont know how to use it and where to place these instrcutions in the .spacemacs file.
Thank.

I Do this in .emacs file:
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/")
(custom-set-variables
'(custom-enabled-themes '(spolsky))) -> loaded at startup
I think also that we can put the theme file inside ~/.emacs.d/etc/themes so that they are view as safe by emacs. Simply use M-x load-theme after.

Related

disable the warnings in VS code

enter image description here
When I click Disable(Workspace) the error is:
Cannot disable extension 'ESLint'. Extension 'Node.js Extension Pack' depends on this.
In what other way can react-native errors be eliminated???
You need to define .eslintignore file in your root directory and add the path of the folder you wish to ignore from linting.
Reference: https://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories
The suggested way to solve the issue is to resolve all the linter issues as they can help you to overcome some scaling issues and make your code consistent.
Workaround for the problem is you can create a file .eslintignore in the root directory of your project and add the file path for which you want to disable the linter.
To disable the Eslint. You can follow the steps.
Navigate to the folder where you defined package.json (Project root directory).
Create a new file with the name .eslintignore
Edit the .eslintignore to add the files where you do not want the linter. Example, you have an src directory where all the react code is present, you want to diable linters for whole src directory. Add the following line in .eslintignore.
src/*
Don't know if you can disable it all but this worked for me for the time being add this // eslint-disable-next-line before the line it warned about

IntelliJ is treating all my files as text files

I created a file with an invalid extension (.jjs) from my sticky keyboard.
I deleted this file
all the icons for all my files turn into text icons. I lose my colour-theming, no variables are highlight, everything is like a plain text file.
How do I fix this? I can't find anything in the help docs
I am currently running IntelliJ 2017.3.2
I solved this by going to preferences -> editor -> file types -> text and removing ".js". Then adding ".js" under javascript files.
You do not have the directory marked as a source directory, hence it is not treated as a directory containing sources.
Either right click on the directory and then "mark directory as->sources root" or go into the module options and from the modules->sources tab mark the directory there.
got to file > project Strucutre click on modules and tab Sources select the directory where is your sourceCode (here src) and mark as Sources

Force IntelliJ to use another Home Directory?

I have read this... it does not answer the question.
I would like to have IntelliJ use another location for all of my project files. Currently, it goes to c:\users\ as a default project location.
I want to change that to c:\git.
I tried to change the "Start in" link properties, to no avail.
I don't want to force all of the configuration (ie: the .IdeaIC15 folder) to be relocated, I just want it to go to c:\git when I click "Open project".
To change the directory where project files are located to C:\git:
Select Help->Edit Custom VM Options...
Add the following line to the end of the file that comes up in the editor (*):
-Duser.home=C:\git
Restart IntelliJ.
(*) The file that comes up in the editor will either be idea64.exe.vmoptions or idea.exe.vmoptions.
Notes:
This will update/create a .vmoptions file in your config directory. It does not modify the vmoptions file in your install directory.
The above steps do not change the default directory that is used
when cloning git repositories. This is the directory that is used in
the File->New->Project from Version Control->Git window. You
still need to set that directory to C:\git and clone one remote repo
into C:\git. Once you have done that IntelliJ remembers the directory and
uses it for subsequent clones.
https://intellij-support.jetbrains.com/hc/en-us/articles/207240985-Changing-IDE-default-directories-used-for-config-plugins-and-caches-storage
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults, make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path

How to get the file upload button to show in the EditMe extension

I'm using the ExtEditMe extension in my project with the following configuration:
$this->widget('ext.editMe.widgets.ExtEditMe',
array(
'model'=>$model,
'attribute'=>'Text',
'ckeConfig'=>array('enableTabKeyTools'=>true,'enterMode'=>2),
'height'=>'500',
'width'=>'100%',
'filebrowserImageBrowseUrl'=>'/protected/extensions/kcfinder/browse.php?type=files',
'filebrowserImageUploadUrl'=>'/protected/extensions/kcfinder/upload.php?type=files',
'filebrowserBrowseUrl'=>'/protected/extensions/kcfinder/upload.php?type=files',
'filebrowserUploadUrl'=>'/protected/extensions/kcfinder/upload.php?type=files'
)
);
For some reason the file upload button isn't showing in the tool bar. Is there something else I need to add?
Questions too much for a comment. Could you check the following:
Check the permissions for the assets folder. Need to be writable by your
httpd (example apache:apache or apache:www-data)
EditMe should be inside the protected/extensions/ folder
Change your widget call to:
$this->widget('application.extensions.editme.widgets.ExtEditMe',
(used full path)
Check if kcfinder/config.php says: 'disabled' => false,
Also, there may be a need to put kcfinder in the root of the webapp. See this example with CKeditor.
The following comes from the CKEDITOR docs:
This button will be hidden by default (hidden:true). The filebrowser plugin looks for all elements with the filebrowser attribute and unhides them if appropriate configuration setting is available (filebrowserBrowseUrl/filebrowserUploadUrl).
Which could mean your config settings for the filebrowser plugin are not correct. You should try the following:
KCFinder (your filebrowser plugin) is not a yii extension as far as I know, so move the kcfinder folder to the root folder (or any other folder outside of the protected folder).
Change the paths to the KCFinder files. I recommend using yii's Yii::app()->baseUrl to make sure you're getting the correct paths:
'filebrowserImageBrowseUrl'=>Yii::app()->baseUrl.'/kcfinder/browse.php?type=files',
'filebrowserImageUploadUrl'=>Yii::app()->baseUrl.'/kcfinder/upload.php?type=files',
'filebrowserBrowseUrl'=>Yii::app()->baseUrl.'/kcfinder/upload.php?type=files',
'filebrowserUploadUrl'=>Yii::app()->baseUrl.'/kcfinder/upload.php?type=files'
Hope that helps.
'filebrowserImageBrowseUrl'=>'/protected/extensions/kcfinder/browse.php?type=files',
'filebrowserImageUploadUrl'=>'/protected/extensions/kcfinder/upload.php?type=files',
'filebrowserBrowseUrl'=>'/protected/extensions/kcfinder/upload.php?type=files',
'filebrowserUploadUrl'=>'/protected/extensions/kcfinder/upload.php?type=files'
These URLs will be passed to the Javascript initiator of the extension, and they will be requested from there, so you can copy them and try requesting them from the browser to see if they are working (I'm almost sure they won't work).
One way you can work this out, is by creating a controller and includes these PHP files there, then make these URLs refer to the controller you created. Hope it helps.

.emacs file permissions?

Ok I have been using Aquamacs and want to do a bit of customizing. So I know that I have to create a .emacs file and add my changes in that file. So I created a text file and named it .emacs in my home directory but since it's .emacs it is hidden and permission is denied to the file. In order to edit it and start adding and customizing my set up how do I access the file? Should I change the read/write permissions or something more? Thank you in advance.
Probably the easiest way to get started is to edit your .emacs file directly from Emacs. Thus, start your Aquamacs and type C-x C-f ~/.emacs RET.
Then - just to make that everything works as expected - add e.g. the following line to the file:
(message "works!")
Save the file with C-x C-s, then restart Emacs. You should see "works!" in the status line right after startup.
Open the .emacs file again as described above and start customizing.