Tag Archives: text edit

Command Line Basics: Compare Files With diff

In my job as a mechanical engineer, I work with large text files for finite element analysis models. I sometimes have to run several iterations to evaluate different design proposals and I need to check my models against the baseline to make sure that only the intended changes are included. The tool I use to compare files is diff. Continue reading

Delete Lines Beginning With A Character In Vim

Lately I’ve been using Vim quite a bit to edit text files for my work. One of the things I wanted to do recently was to remove all of the comments from a text file in order to reduce its size prior to uploading it to the server over my relatively slow internet connection. In this post I’ll show how to remove lines that begin with a given character or character string using vi/Vim/gVimContinue reading