This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Highlight a word from inside vim. The color is chosen at random but | |
" persisted across sessions. | |
" By Kartik Agaram -- http://akkartik.name -- [email protected] | |
" Experimenting with an idea by Evan Brooks: https://medium.com/p/3a6db2743a1e | |
" Discussion: http://www.reddit.com/r/programming/comments/1w76um/coding_in_color | |
let highlight_file = &viewdir."/highlights" | |
if !filereadable(highlight_file) | |
call system("mkdir -p ".&viewdir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Highlight a word from inside vim. The color is chosen at random but | |
" persisted across sessions. | |
" By Kartik Agaram -- http://akkartik.name -- [email protected] | |
" Experimenting with an idea by Evan Brooks: https://medium.com/p/3a6db2743a1e | |
" Discussion: http://www.reddit.com/r/programming/comments/1w76um/coding_in_color | |
let highlight_file = &viewdir."/highlights" | |
if !filereadable(highlight_file) | |
call system("mkdir -p ".&viewdir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Highlight a word from inside vim. The color is chosen at random but | |
" persisted across sessions. | |
" By Kartik Agaram -- http://akkartik.name -- [email protected] | |
" Experimenting with an idea by Evan Brooks: https://medium.com/p/3a6db2743a1e | |
" Discussion: http://www.reddit.com/r/programming/comments/1w76um/coding_in_color | |
let highlight_file = &viewdir."/highlights" | |
if !filereadable(highlight_file) | |
call system("mkdir -p ".&viewdir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For each line of the input file, remove nonalphanumeric characters, | |
// lowercase all letters, remove stopwords, and write the result to the output | |
// file. I used the answer here as a template for reading/writing files: | |
// http://stackoverflow.com/questions/1821811/how-to-read-write-from-to-file/9739903#9739903 | |
package main | |
import ( | |
"bufio" | |
"fmt" |