# Today's Interesting Links (2024-01-16)

**URL:** <https://pluralist.net/t/todays-interesting-links-2024-01-16/46>\
**Category:** breadcrumbs\
**Created:** [January 16, 2024, 8:00am UTC](https://pluralist.net/t/todays-interesting-links-2024-01-16/46 "2024-01-16T08:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![delyan](https://pluralist.net/user_avatar/pluralist.net/delyan/32/245_2.png) [@delyan](https://pluralist.net/u/delyan)\
**Post date:** [January 16, 2024, 8:00am UTC](https://pluralist.net/t/todays-interesting-links-2024-01-16/46/1 "2024-01-16T08:00:00Z")

</div>

- I love [Far Manager](https://www.farmanager.com/). My main machine these days is a Slackware X1 nano, but if I ever open my Windows laptop I use [Far Manager](https://www.farmanager.com/).
  - Far Manager is what many Eastern European competitive programmers use to compete with - here is [Gennady Korotkevich for example](https://youtu.be/fh3C_4L0Tm4?si=xEB-cQ_pHFxwGQ8r&t=1331)
  - and here is how to [setup Far Manager for competitions](https://codeforces.com/blog/entry/532).

- The code of Far Manager is unsurprising gorgeous, tidy, and easy to understand. Here is the ScrollUp function for instance:

```C++
void Editor::ScrollUp()
{
	//TODO: "Свертка" - если учесть "!Flags.Check(FSCROBJ_VISIBLE)", то крутить надо до следующей видимой строки
	if (m_it_CurLine == Lines.begin())
		return;

	if (m_it_TopScreen == Lines.begin())
	{
		Up();
		return;
	}

	--m_it_TopScreen;

	UpdateIteratorAndKeepPos(m_it_CurLine, [](numbered_iterator& Iter) { --Iter; });
}

```

And how it is used:

### When you hit control and up

```C++
		case KEY_RCTRLUP: case KEY_RCTRLNUMPAD8:
		{
			m_Flags.Set(FEDITOR_NEWUNDO);
			ScrollUp();
			Refresh = true;
			return true;
		}

```

### when you hit Page Up

```C++

		case KEY_PGUP: case KEY_NUMPAD9:
		{
			m_Flags.Set(FEDITOR_NEWUNDO);

			repeat(m_Where.bottom - m_Where.top, [&]{ ScrollUp(); });

			Refresh = true;
			return true;
		}

```
