Is there a way to change a Coc settings from script? Extension options are normally stored in the coc-settings.json file. If you want to toggle a specific setting it is slow to open the file, edit and save. Preferable I would like to be able to map a key to an extension setting.
You can use coc#config
https://github.com/neoclide/coc.nvim/blob/101175f47c15ff11eb599c617ef895f578f758b8/doc/coc.txt
or g:coc_user_config .
https://github.com/neoclide/coc.nvim/blob/101175f47c15ff11eb599c617ef895f578f758b8/doc/coc.txt#L890
You can change the configurations by coc#config, for example:
call coc#config('signature', {'preferShownAbove': v:false})
Related
I've googled this issue and haven't seen any useful advice. My understanding is that the default settings should work; I can't see any information about mandatory modifications to the default settings.
You have not configured the plugin correctly, the default configuration file and your user configuration file will open in a new window
when I try to open the debugger, then it opens the user settings (an empty file) and the sublimeGDB settings file, which seems like it's the default. The setup tutorial on https://github.com/quarnster/SublimeGDB doesn't mention needing to modify any files, only that doing so is possible if you want to change your preferences.
Also, I do not understand the following instruction:
Open up the default settings via the command palette and begin typing GDB and select the default.
When I open the command palette, there is no "default" option when I type in GDB, only a list of SublimeGDB features (all of which lead to the titular error)
I installed SublimeGDB with package control.
If you look at your SublimeGDB.sublime-settings and you read some properties you can see that their values are set to "notset"
As the very minimum you have to set those:
"workingdir": "${folder:${file}}",
"commandline": "gdb --interpreter=mi --args ./${file_base_name}",
"env": {"DISPLAY": ":100"},
The working dir is the directory of the current open file.
This will launch the executable file that is named like the file you have currently open (without extension)
There are many others settings and options.
You need to read and learn how to configure them in order that they fit your needs.
I intend to create a set of options in vimscript as flags that I can then set at runtime to change the behaviour of my script.
How can I create custom option variables, other plugins like NERDTree for example seem to be able to do it...
The set of Vim options (i.e. the stuff that you manipulate with :set) is fixed. But plugins use variables, usually named g:PluginName_OptionName or so, to get something very close to options. With the different variable scopes (g:, b:, w:), you can even achieve something like the buffer- or window-local options in Vim: This means that the plugin checks for the existence of the local variable first, and falls back to using the global variable if no local one exists.
Plugins should provide default values for their configuration variables, that can be overridden in the user's .vimrc. This is achieved by a test like this:
if ! exists('g:PluginName_ConfigItem')
let g:PluginName_ConfigItem = 'default value'
endif
If you plan to publish your plugin, be sure to document the variables and what values they can hold.
I just want emacs to load another file as the configuration file, and ignore the default file ("~/.emacs").
Note that I don't want to change the original "~/.emacs" file.
I've tried to change "$HOME" env variable, but it doesn't work.
(Platform is Linux.)
emacs --no-init-file --load=some-other-config.el
Or with short options:
emacs -q -l some-other-config.el
From the Emacs manual, section 48.4:
Emacs looks for your init file using the filenames ‘~/.emacs’, ‘~/.emacs.el’, or ‘~/.emacs.d/init.el’ you can choose to use any one of these three names […].
If you really want to use another file, you should consider patching Emacs and making a custom build. It looks like lisp/startup.el:1009 is a good place to start.
As far as I can see, the only option is to use -u to indicate another user's init file.
As #Benjamin quoted, there are three filenames you can choose. As normally, we choose ~/.emacs.d/init.el to be loaded. That's because, we can simply add more configuration files in this directory and add them all under version control(Git). Be sure ~/.emacs and ~/.emacs.el removed before u choose to use the ~/.emacs.d/init.el.
Is there a trick or script that allows me to switch between sets of vim-plugins and -settings easily?
I use vim for very different development and writing. It can be really annoying to have certain webdevelopment-specific plugins turn up, when writing a report in LaTeX, for example.
What I'd like to see is something like RVM.
Have a set of "global" plugins and settings; plugins and settings that are always enabled or used.
Per project plugins and settings; pluginss, configurations and settings that will be loaded after activating that "environment".
You may find localvimrc to be useful for point number two. It allows you to have a .lvimrc in your project folder with settings for that specific project. In that file you could load your project-specific plugins by manipulating the runtimepath or by using pathogen/vundle/whatever.
Using this method you would configure your "global" settings and plugins as you would normally.
Nice question IMHO. By the way, using a plugin manager could simplify this kind of stuff too. For example, with pathogen you can do something like:
" To disable a plugin, add it's bundle name to the following list
let g:pathogen_disabled = []
if your_condition
call add(g:pathogen_disabled, 'myplugin')
call add(g:pathogen_disabled, 'myplugin2')
end
See this answer for a good example about conditional loading. It would be very nice to see this feature implemented in pathogen.
I'd just make aliases
alias mvim='vim -u myvimrc'
alias ovim='gvim -U someothervimrc'
Ans yes you could use runtimepath inside the vimrc-s to setup very different configurations
I am working with Notepad and the FTP plugin. The .htaccess files do not show up in the folder tree of the server. Anyone else encountered this and know of a fix?
I know this is an old question now, but I've run into this problem, too.
In the current version of Notepad++ (v5.9) the NppFTP plug-in (v0.23) has a setting for each connection called "LIST parameters". It is accessible via Settings/Profile settings/FTP Misc. Enter "-al" there and hidden files should be visible. Remember to set it for each profile.
The file is there, its just hidden. If you can type in a file name for download you can probably get it.
I don't use notepad plus but if the ftp plugin has a setting to show hidden files then you should be able to change that so you can see the .htaccess file. The server is probably unix so any file that starts with a dot is a hidden file.
It's normal behaviour. In options of your FTP client plugin find option "show hidden and hidden files. For example in Total Commander it's:
Network -> FTP Show hidden files
In the FTP page profile settings, choose FTP misc. and type -al. It fixed my problem