I'm using Vim on Ubuntu 14.04 LTS. I've been confused by these two situations and I think they might have common cause:
When I open a text file in vim and paste some content that I copied from web browser using right click then paste, the pasted content cannot be recognized by the program that's supposed to process the text file anymore. Supposedly the program reads the entry from the text file and make this entries available to other programs:
ornAna1 Platypus Mar. 2007 (WUGSC 5.0.1/ornAna1) (ornAna1) galGal2 Chicken Feb. 2004 (WUGSC 1.0/galGal2) (galGal2) galGal3 Chicken May 2006 (WUGSC 2.1/galGal3) (galGal3)
If I deleted the line starting with galGal2 manually and typed in new content so that it becomes the following, it can be recognized by the program correctly.
ornAna1 Platypus Mar. 2007 (WUGSC 5.0.1/ornAna1) (ornAna1) galGal4 Chicken Nov. 2011 (ICGSC Gallus_gallus-4.0/galGal4) (galGal4) galGal3 Chicken May 2006 (WUGSC 2.1/galGal3) (galGal3)
If I paste the galGal4 line from web browser, then that line is skipped by the program.
Then in a shell script, a similar situation happened. I have a code block that looks like this:
python2 -c "import pip" > /dev/null 2>&1 if [[ $? -eq 0 ]]; then echo "pip is installed" elif [[ $? -eq 1 ]]; then echo "pip is not installed" fi
If I type the whole thing in, then this part of the script works fine. If I copy this from an indented block within the shell script, by highlighting the texts and right click copy, then right click paste, then somehow this part doesn't seem to be executed at all.
What could be the cause of these problems?
Update : While I'm certain that the problem with shell script (copying from indented text and pasting in the same file somewhere else) happened once, I wasn't able to reproduce it. There's a chance that it's a temporary glitch.