Far как создать bat файл
You can download Far Manager here, i strongly recommend download the latest nightly build in archive mode.
After download is finished uncompress the .7z file in a folder called Far then run far.exe.
Far Manager Main Screen
Read the problem statement of Theatre Square, i use the solutions of t__nt in C++ for explain the basics of Far Manager.
The main screen contains two panels and the command line, you can rename, delete, create and view files or folders also copy or move files or folders between panels.
In the command line using the plugin farcmds you can call system commands like type echo and others.
Panels and Command Line
Make a folder called codeforces where you will put your source code pressing F7.
Making a folder
Type cd codeforces the press Shift + F4 for create a new file: theatre.cpp
Now you can type the source code and save pressing F2.
For compile the source code, assuming g++ is in the Path, type far:view <g++ -o theatre.exe theatre.cpp and you'll see the compiler messages, quit with F10 too.
Now create your input file theatre.in with the next content:
the solution for this test case is 4.
Run your program typing far:view <theatre <theatre.in
Colorer is a plugin for Far Manager than allow you highlight the source code for many languages, you can download here and uncompress into the Plugins folder.
After restart far you can view:
Editor with Colorer
You can use Far Manager in Linux if you have wine installed.First of all I need to note, that most of Russian best teams of 2008 during Petrozavodsk training camp were using Far as their primary IDE. E.g. SpbSU Burunduchki, or Orel STU with Dmitriy Zhukov and many others. Petr, as I remember, was using other IDE, but still was using Far to organize his source files during the competitions.
There are several interesting features which are not covered in the post.
Typing each time "g++ bla.cpp" is kind of annoying (even though linux-guys like doing so)
Moreover, if you use Visual C++ compiler, which is more common case for Windows user, path to cl is not even in PATH.
There's a very nice workaround - press F9, in the menu appeared choose Commands->File Associations, press Ins, then for mask enter "*.cpp", for description something reasonable, line "C++ Source File" and for execute command something like
g++ .
or, if you use visual studio,
C:\"Program Files"\"Microsoft Visual Studio 10.0"\VC\vcvarsall.bat && C:\"Program Files"\"Microsoft Visual Studio 10.0"\VC\bin\cl.exe . && del !.obj
(don't forget to change path to visual studio)
After that you can compile source file by just pressing enter on them, which in most cases grant you higher productivity than any other IDE, as Far behaves much faster, and allows you to switch between different source files or between source file and input or between source file and output faster.
Читайте также: