I read other posts, for example vim: Executing a list of editor commands and others. The answer is incomprehensible to me for my case. I have some editor commands that I created from an SQL query. It uses: s / foo / bar to change country codes (from FIPS to a custom set of codes). Here's a sample file:
:s/CB/CAMBO :s/CQ/NMARI :s/KV/KOSOV :s/PP/PAPUA ...
I saved this in a file called fipsToNonStd.vim (not sure about the correct extension). I want to run these commands one by one. What is the easiest way to do this?
Thank! SO Rocks!
, :source.
:source
-, vim, :help :source.
:help :source
, .vim . , convert.vim:
:%s/CD/CAMBO/g :%s/CQ/NMARI/g " etcetera
Vim :
:so convert.vim
, , , vim? . , - . convert.vim :
:%s/CD/CAMBO/g :%s/CQ/NMARI/g " etcetera :w! :q
. , " ", , data.txt. :
vim -s convert.vim data.txt
/ .
: source fileName
You can put these lines in a function that will be called later: call FName
Source: https://habr.com/ru/post/1736161/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1736156/source-core-repositories-and-sticky-notes&usg=ALkJrhjcdg78cKzZErSI3dhOWZxebFmYPwWhat is the relationship between the heap used in dynamic memory allocation and the data structure? - c ++Parsing a TSV File - c #Quotes in tab delimited file - c #How to get HTML with JavaScript support? - javascriptXML schema validation for large schema files - xsdGet the first few items from a list in C # - listСписок. Сортировка ошибок сортировки неверно. - sortingRails is an association, can't access owner attributes on partial collection? - ruby | fooobar.comZend_Form и Zend_Filter - phpAll Articles