Removing BOM characters using Java [duplicate]

Java does not handle BOM properly. In fact Java handles a BOM like every other char. Found this: http://www.rgagnon.com/javadetails/java-handle-utf8-file-with-bom.html public static final String UTF8_BOM = “\uFEFF”; private static String removeUTF8BOM(String s) { if (s.startsWith(UTF8_BOM)) { s = s.substring(1); } return s; } May be I would use apache IO instead: http://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/input/BOMInputStream.html

Linux vi arrow keys broken in insert mode

I presume you’re using vim as this is tagged as Linux. Try: :set nocompatible (You may want to configure your .vimrc with this by adding this command to it. Create a new .vimrc file if not already present in your home directory, run echo $HOME to check home directory path.)

How do I use vi keys in ipython under *nix?

In case someone’s wandering in here recently, IPython 5.0 switched from readline to prompt_toolkit, so an updated answer to this question is to pass an option: $ ipython –TerminalInteractiveShell.editing_mode=vi … or to set it globally in the profile configuration (~/.ipython/profile_default/ipython_config.py; create it with ipython profile create if you don’t have it) with: c.TerminalInteractiveShell.editing_mode=”vi”

Setting the Vim background colors

As vim’s own help on set background says, “Setting this option does not change the background color, it tells Vim what the background color looks like. For changing the background color, see |:hi-normal|.” For example :highlight Normal ctermfg=grey ctermbg=darkblue will write in white on blue on your color terminal.