Skip to content

Instantly share code, notes, and snippets.

View jecs's full-sized avatar

José E. Cruz Serrallés jecs

  • New York University, Grossman School of Medicine
  • New York, NY
View GitHub Profile
@jecs
jecs / disable-julia-vim-tab-to-spaces.md
Last active November 13, 2023 16:43
Disable tab-to-spaces when using julia-vim

Option

The option that lets you achieve this is let g:julia_set_indentation=0. You can place this in your .vimrc. You can find this option using :h julia-vim at the very bottom of the help page. Note that this goes against the Julia community's style guidelines.

Sample .vimrc

I use vim-plug to manage my addons. If you use another addon manager, then you might have to edit the beginning to suit your needs.

call plug#begin()
Plug 'JuliaEditorSupport/julia-vim'
call plug#end()
@jecs
jecs / matlab_desktop_resize_fix.md
Last active March 29, 2019 15:35
Fix for MATLAB R2018a error 'Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData'

The issue pops up when you resize the desktop, as is commonplace when you use VNC across multiple machines.

A good workaround for this issue is to install the latest Oracle Java 8.

Installing Oracle Java 8

If you are using Ubuntu, you can add the Oracle 8 ppa:

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer