I would like to copy guake terminal settings from one machine to another (like it use to be with dotfiles), instead of modifying settings in guake settings gui. However, I can't find where are guake terminal settings stored. I tried to search in guake documentation but there is no mention about such configuration file.
Do you know, if it is possible?
Thank you!
You can use the --save-preferences option for this:
guake --save-preferences=myprefs.cfg
It will write a config file in the current working directory.
To load your saved prefs:
guake --restore-preferences=myprefs.cfg
Related
For the VimR OSX app, I want to change the default vim settings (like default colorscheme, or always having :set number), and read online that there's a vimrc file that should be changed, but for some reason I just can't find it on my computer.
Do you guys know where the vimrc (or whatever the vim config file is called) for VimR is?
Thanks!
VimR, (now?) tracking NeoVim, not Vim, isn't using ~/.vimrc by default any more:
User: I reinstalled VimR recently, and settings from my .vimrc are no longer loaded. Should I create some new dotfile and source .vimrc in it?
Author: NeoVim changed that: https://neovim.io/doc/user/nvim.html#nvim-from-vim
and to quote from the linked NeoVim docs:
Transitioning from Vim *nvim-from-vim*
To start the transition, create ~/.config/nvim/init.vim with these contents:
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath = &runtimepath
source ~/.vimrc
Note: If your system sets `$XDG_CONFIG_HOME`, use that instead of `~/.config`
in the code above. Nvim follows the XDG |base-directories| convention.
Then I open vim from terminal and open an directory like vim ., my starts in Read Only Mode.
I cant figure out why this happen and how I can change it.
If I start MacVim everything is fine. But then I start vim from the terminal and open a directory this screen comes. I can navigate one dir up and back again, and I have write access.
EDIT
I installed all my vim settings on Ubuntu 15.04. Now I can use
Does anybody know how to change this behaviour of vim?
Now I can use netw with the command vim . like I always used.
As you can see, there is no RO (read only) mark. How can
I have this in Mac on iTerm too?
What you see is exactly what you are supposed to see when doing $ vim .: the built-in netrw plugin displays a listing of the current directory that you can use to navigate your project.
If you don't want that listing, don't ask for it:
$ vim
or:
$ vim file
ctrl-p is not mapped by netrw; on my system, its set up by the yankring plugin. If vim is doing something other than going up one line, then you have a plugin involved. Try using :map to see what its mapped to; then do a search for that in your plugins directory.
The netrw way of opening a file in the same window is to use the <enter> key, although the g:netrw_browse_split variable may be used to change that default behavior.
Netrw opens in read-only mode, and that's not going to change. The file being opened should not be in read-only mode, however, if that's what you meant. If you're having a problem of that sort, please update your netrw; the most up-to-date version is at http://www.drchip.org/astronaut/vim/index.html#NETRW .
After I installed macvim 7.4 Every thing works!
I have VsVim and when I load my solution file, I always need to :set ignorecase and :set smartcase each time. I'd like to save these settings, but I can't find where VsVim stores its settings or how to save its settings.
This has recently changed:
https://github.com/jaredpar/VsVim/wiki/faq
How can I verify my .vimrc is loading?
There are 2 non-standard vim settings that can be used to diagnose potential .vimrc load issues
vimrc – This setting will display the full path of the file which was loaded for the .vimrc
vimrcpaths – This setting will display the files and paths searched for .vimrc
By default VsVim will look for a file named .vsvimrc, _vsvimrc, .vimrc or _vimrc file in the paths HOME, VIM and USERPROFILE
As of now the commands supported in the .vimrc file are limited to those supported in command mode.
How do I make a file writable from Vim on a Windows machine? I currently manually go find the file in explorer, open it's properties and uncheck readonly. I would like to be able to do this more quickly.
It seems attrib is the Windows shell command to modify file attributes.
See :!attrib /?
:!attrib -R %should remove the Read only property on the file. (It is working here the [RO] flag is modified in my status bar).
You will be prompted to reload the file (if you don't have autoread set) : don't ! and then save with :w!
(Rereading your question I am not sure that the Read only flag is your issue there because :w! should work anyway. )
Maybe I am missing something but :w! works for me.
Use :saveas C:\Users\your_user_name\Desktop\temp.txt and use explorer to copy it to its original location with UAC.
When I start GVim and start writing my little program I'd like to save the file to the Desktop but it seems that Vim is starting the command line in:
C:\Windows\System32
How would I go about changing that to:
C:\Users\Casey
so then I could just:
:w Desktop\my_program.py
Assuming you're starting gvim from an icon/shortcut in Windows (from the kind of paths you supply), you can change the starting directory (completely independent from the fact that it IS gvim: it would be the same from any other app!) by editing the "starting directory" property of that Windows icon/shortcut.
Within vim, you can change the current directory with the :cd command:
:cd c:\users\casey
I found this way to be better:
Open gVim
:cd $vim
:e _gvimrc
Add the following line:
:cd c:\users\user\desktop\
I found that :Ex is slow on large directories like c:\windows\system32\ (where gVim usually starts).
Also, here is my full _gvimrc in case anyone is interested. I prefer Consolas for coding. The tabstop setting helps when coding especially in Python, and Ctrl+Tab/Ctrl+Shift+Tab is great for switching between buffers:
set guifont=Consolas:h12:cANSI
set tabstop=4 softtabstop=4 shiftwidth=4 expandtab
map <C-Tab> :bnext<cr>
map <C-S-Tab> :bprevious<cr>
:cd c:\users\user\desktop\
How about changing your starting position?
vim icon -> right click -> property -> shortcut -> Start in -> your path you want to change.
but it works perfectly.
I think :cd yourpath also works. but it will change when you don't want to change.
Use :cd c:\users\casey,
after that save into session (in gVim there is button up and down in red, click on it and save as mySessionProject.vim). Next time you need to go to that directory, open that session (you can also use :source mySessionProject.vim)
for command line:
:mksession! yourdir/yourVimConfName.vim
to load
:source yourDir/yourVimConfName.vim
I found the following to be very useful. I am on Windows 7 and vim 7.3.46, and am using gVim.
I edited startup settings, which wound up altering the _vimrc in c:\Users\me\.
I also tried using :version and editing the _vimrc files I found at $VIM, as well as the _vimrc I found at c:\windows\system32.
Editing those files to include :cd c:\Users\me did not result in my default startup directory changing after starting vim. I wanted my default directory to be c:\Users\me\, and editing c:\Users\me\_vimrc achieved that. That is I entered
:e $MYVIMRC
and added
cd c:\Users\cnorton.Arlington1\
to that file.
Just to to put this up incase anyone needs it:
vimrc accepts enironmental parameters. you can put cd $USERPROFILE in your vimrc
Use this mapping in your .vimrc file
:cd $USERPROFILE\Desktop<cr>
or the same shorter
cd ~\Desktop<cr>
A mapping that also displays afterwards the path instead of the command
nmap <leader>d :cd ~\Desktop<cr>:pwd<cr>
Inside init.vim, I use:
lcd $HOME/Projects