CLion filling temp directory - clion

CLion has been generating multiple ~100M sized preamble-* files in the standard /tmp directory.
Any suggestions on how this can be disabled?
Alternatively any suggestions on how to change the default temp directory?

The preamble-* files are created by Clang that is used by CLion.
To change the directory specify an environment variable TMPDIR=/your/preferred/location when running CLion.

Related

If a folder is read-only, where do the pyc files go?

I am running .py files from a read-only network folder (via Python 2.7 on Windows). Are pyc files still generated? And if so, where do they go?
The contents are generated by the compiler, but they are simply not saved (a loader may set an alternate __cached__, but normally doesn't). The .pyc files are merely used to cache the result of the compilation. distutils.util.byte_compile has some documentation links for further details.

Two vimfiles directories. Where do I install my plugins?

I'm using Windows 10.
I want to give Vim another shot after having some troubles with it in the past. I'm eager to learn it, but I'm confused. I gave a pretty thorough search to find my answer before I resorted to posting this here, but what is the proper way to install my vim plugins. I see two vimfiles folders in two different directories.
One in the $HOME directory.
C:\User\[USERNAME]\vimfiles
And one in the installation directory.
C:\Program Files (x86)\Vim\vimfiles
Is there a reason for there being two of these ? What's the best directory to install my plugins ?
It is related to 'runtimepath' param. Read :help 'runtimepath' for more info . C:\Program Files (x86)\Vim\vimfiles is system folder with default plugins which are shipped with vim itself. C:\User\[USERNAME]\vimfiles is your local runtimepath. And there you should put your plugins. This way if you have multiple users they all will have own vim environment to work in. If you want you can even set different runtimepath but this is whole another question))
C:\User\[USERNAME]\vimfiles is your vim runtime files and C:\Program Files (x86)\Vim\vimfiles is Vim's runtime files. As long as a feature is present in your vim runtime files and vim request it, it will load them and if its not present there, then it will fallback to his runtime path to find it (i.e. C:\Program Files (x86)\Vim\vimfiles ). So you should always install your plugins, colorschemes, syntaxes, ... in your vim runtime files and also back it up in a safe place and never touch vim's runtime files.

Fixed cmake output directory

I'm working on my first project using cmake, and for the most part it's been going well but I've run into one problem I can't figure out.
Let's say I have my CMakeLists.txt file located at ~/project/build. I would like for the output from cmake (not the binaries, but the makefile/configuration files) to be independent of where I run cmake from.
As an example, if my terminal is sitting in the ~/project/build directory, calling cmake ~/project/build creates the makefile and everything else within the ~/project/build directory. This is the behaviour that I'd like. If I call cmake ~/project/build from anywhere else, it creates the makefile and everything else in whatever directory the terminal called the program from.
Is it possible to force cmake to generate its makefile and associated files in the same folder as the CMakeLists.txt file? I've taken a look through the documentation and I've had no problems figuring out how to change binary output directories, but I can't really find any mention of what I'm trying to do.
I realize this is a pretty minor annoyance (it's not that hard to move into my build folder before building the project) but I'm just wondering if it's possible and if there's some reason it wouldn't be advised.
You have to use 2 commands for this
1) cmake -B "Dest path(Any path in which u want to generate the output files)" -H"Source path(root CMakeLists.txt path)"
2) cmake --build "Dest path"

How can I get gVim (Windows) to use "home\.vim" for my plugins?

I have a Desktop running Windows 7, and a Macbook Pro running Mountain Lion. I use gVim and MacVim respectively. I like to keep my plugins and settings synced between the machine, so I store them in my Google Drive, and I can always pull them from there.
On my Mac, I just have a .gvimrc file and a .vim folder in my home folder, and Vim loads all my plugins and settings properly.
On my Windows computer however, Vim WILL properly load settings from the .ggvimrc file in my home folder. But if I store plugins in "home.vim\plugin" Vim will NOT load them.
To get plugins/themes working on my Windows machine, I need to put them in "C:\Program Files (x86)\Vim\vimfiles\plugin"
I would like to be able to store everything in my "home.vim" folder on either machine, and have it work properly.
So is there any way to set this up on my Windows machine?
Thank you!
As long as you keep your .vimrc in a default location (cp. :help vimrc), and only want to change the path to plugins, syntax files, etc., you can put the following into your .vimrc file:
if has('win32') || has('win64')
set runtimepath=path/to/home.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,path/to/home.vim/after
endif
You didn't specify your exact path, so I used path/to/home.vim here; adapt to your system.
Your use case of synchronizing the configuration is quite common, what is unusual is that you seem to want to keep your .[g]vimrc in a default location, but only move the plugins etc. somewhere else. Typically, both .vimrc and the .vim/plugins subfolders are moved away, and people use symbolic links (created with mklink on Windows) to refer to them from their home directory.
Somewhere at the beginning of your .vimrc (inside a if has('win32') || has('win64') if your files have to run on other platforms)
set runtimepath-=~/vimfiles
set runtimepath^=~/.vim
set runtimepath-=~/vimfiles/after
set runtimepath+=~/.vim/after
On Windows 7, you must put your plugins and colorschemes in:
C:\Users\username\_vim\
and your settings in:
C:\Users\username\_vimrc
First I put the contents ~/vimfiles into ~/.vim.
Then I added this to my vimrc:
let &runtimepath.=',$HOME/.vim'
On Windows 10, the vim directory is located at %USERPROFILE\vimfiles, you may link it to any other directory through the mklink command.
On Windows I don't use %USERPROFILE% to store .vimrc, instead, I create an environment variable %HOME% pointing to my custom directory, and I have %HOME%/.vimrc and %HOME%/.vim/ there, using .vim/ makes sure the "vim" from Windows git installation can use them directly.
The Windows VIM has a default runtime path entry of ~/vimfiles, with ~ corresponds to %HOME%, so I create a directory symbolic link as follows:
cd /d %HOME%
mklink /j /d .vim vimfiles
Then all both the .vimrc and .vim/ in my custom directory are working in different environments, without if has("win32") stuff in your .vimrc for this purpose.
I was unable to implement either of your suggestions for some reason.
I ended up finally solving this by by creating softlinks to my Google Drive folder on all machine. Now if I edit my .vimrc or .vim folder in my Google Drive folder, it's reflected on all machines instantly. It's great!

Where is the configuration files for sublimeText 2.0.1 on Ubuntu 64 bit 12.04?

I'm trying to change my python version to be /usr/bin/python3 which I would make the change, according to default settings:
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
I simply cannot find the Packages/Python/ or Python.sublime-settings directory or file.
Trouble setting Python version in Sublime Text2
I verified a fresh download also lacks this folder structure. Where is the directory and/or file(s) for user defined settings for the Ubuntu 64 bit package?
Packages/Python/ directory should be located in
~/.config/sublime-text-2/Packages/Python
A tip to find where Packages directory is located: open the Default Settings, from menu Preferences/Settings-Default and look at the full path of the file:

Resources