Leon Trotsky found Vienna to be a most livable city. For the Marxist revolutionary and sworn enemy of the bourgeois, the stylish, imperial Habsburgcapital was way more livable than, say, czarist St. Petersburg or some godforsaken city on the Black Sea. From 1907 until Austria-Hungary disastrously declared war on Serbia in 1914, Trotsky thrived in Vienna — “a city lavish with civilities” — living like a “lordly flaneur,” sipping mochas, nibbling cakes and smoking cigars in the ornate coffeehouses, where “repartee flashed from spoonful to spoonful of whipped cream,” and where he scribbled notes about his conversations on Freudian psychoanalysis and scandalous avant-garde artists such as Egon Schiele.

At the Naschmarkt, an open market in Vienna. Vienna has been listed as “The Most Livable City in the World” by the Mercer Quality of Living Survey for six years. (Eugenia Maximova/Anzenberger)

Trotsky’s life in Vienna was one of “beautiful uselessness,” to borrow the phrase that Joseph Stalin used to slander his rival. Stalin, in fact, spent a month here in 1913, holed up a few doors down from the emperor’s summer palace at Schon­brunn. Stalin hated Vienna, as did another unhinged young man named Adolf Hitler, who in 1913 was painting and ranting in the city’s Mannerheim, the shabby “home for men,” about nine tram stops past Sigmund Freud’s apartment.

All this context is according to “Thunder at Twilight,” Frederic Morton’s excellent book on Vienna at the precipice of World War I, in which he tells us that Trotsky penned despairing essays about his homeland. “How miserable was our gentry!” Trotsky wrote, worrying that his people back home were trapped by a dead-end “fanaticism of ideas, ruthless self-limitation and self-demarcation, distrust and suspicion and vigilant watching over their own purity.”

One hundred and two springs later, I sat in Vienna’s grand, stately Café Sperl (founded 1880) eating poppy-seed strudel and sipping a kleiner brauner on a rainy afternoon, reading Morton on my iPad. Around me buzzed stern waiters in uniform as people flipped through newspapers in several languages and played billiards, as if the Austro-Hungarian Empire still ruled Central Europe. If I were in a different kind of exile, I might have noted that Trotsky’s worries about his people mirrored my own worries about the intellectual and political direction of my American homeland. But since this was not 1913, and I am not a revolutionary, I just finished my strudel and reflected on how much the city has changed since its fin de siècle heyday.

The scandalous avant-garde art is not so scandalous anymore: Posters for an Egon Schiele exhibition at the Leopold Museum hung at tram stops, and blasé workers and schoolchildren started and ended their days amid images of a skinny, pale, nude woman. For 10 euro, you can visit the Sigmund Freud Museumand Instagram a cheeky photo of the original cover of Dr. Freud’s infamous treatise on cocaine, “Über Coca.” Even the traditional Viennese coffeehouse culture, after a period of kaffeehaussterben or “coffeehouse death” in the late 20th century, needed a little help from UNESCO to ensure these historic cafes survive into the 21st century, so tourists like me can eat strudel and mispronounce “fin de siècle.”

Not that I saw myself as a tourist. Not really. This time, just like Trotsky, I was thinking about staying in Vienna for a while. I’d rented an apartment outside the city center. I’d purchased a pass for the U-Bahn subway system. I considered getting a Club Card for discounts at the ubiquitous Billa grocery store. And I had a relatively positive encounter with the health-care system: stomach distress. Diagnosis: too much schnitzel.

The reason for this deep level of pseudo-assimilation was both simple and complicated. In 2015, I read a report that ranked Vienna as “The Most Livable City in the World,” based on the Mercer Quality of Living Survey. In fact, Vienna had been ranked as having the highest quality of life by Mercer for five years. Sure, it’s the kind of syndicated pap that often runs on the inside pages of the local paper or used as filler on the evening TV news. Mercer compared 221 cities based on 39 criteria, such as political stability, crime, schools, public services, recreation, housing, natural environment and “personal freedom.” Monocle, the international lifestyle magazine with a theoretical audience of well-dressed creative professionals who wear eyeglasses and footwear and who fuss about first-class lounges and have the perfect carry-on bag, also ranks Vienna high: No. 2in its 2015 Quality of Life Survey.

As a ridiculous Europhile who likes to pretend I am the target audience for publications like Monocle, I’ve kept vague tabs on these sorts of “most livable” surveys for years. But reading these latest reports on Vienna hit me at a weak moment. That’s because I felt finally fed up with my current metropolitan area, Philadelphia, which ranked a very mediocre 55th in the 2015 Mercer survey. (Washington wasn’t much better at 50th, by the way.) At long last, I yearned to move to a new and more livable city.

That is the more complicated reason I was there. I’d visited Vienna a couple of times before and liked the blend of northern European efficiency and southern European joie de vivre. I liked the mix of the grand imperial buildings and the quiet beauty of the Jugendstil architecture. I liked the clean streets, the amazing, punctual public transportation and the lovely public spaces. I liked that it was so easy to eat well at low-key restaurants and drink great, relatively undiscovered wines at bars. I liked the people, who were politely aloof at first, but who were lovely once they warmed up to you. And because I am hopelessly nostalgic, I liked the melancholy history, which is inescapable. “Imperial Austria,” writes Morton, “has become a byword for melodious decay.”

It’s a universal impulse. What traveler, after a few days in a fantastic city, hasn’t daydreamed a romantic expat life? Who hasn’t spent a few days somewhere and said, “Oh yeah, I could definitely live here.”

Café Sperl is a traditional Viennese cafe in the Mariahilf sixth district of Vienna. Jacob Ronacher founded the cafe as Café Ronacher in 1880. (Eugenia Maximova/Anzenberger)

Even though there was a lot of rain, Vienna in May still buzzed. All around the city, people prepared for the upcoming Eurovision Song Contest, the continent-wide pop spectacle being hosted in town last spring. The winner of the prior year’s contest was an Austrian drag queen named Conchita Wurst. Images of Conchita, with her flowing locks and signature dark beard, were everywhere. I even saw an elaborate cake bust of Conchita as I passed the shop window of an old-fashioned Viennese konditorei, or pastry shop. The omnipresence of bearded Conchita suggested a more evolved, tolerant society.

On my first morning, I stopped for a pastry at the little kiosk next to the Pilgramgasse U-Bahn station and then took the train two stops, exiting the station designed by the famed architect Otto Wagner at Stadtpark. I wandered through the cozy green park, past the monuments for composers Johann Strauss and Franz Schubert, and past people practicing tai chi and feeding ducks. After a short walk in the city center, I decided to get a haircut at Herrenfriseur Salon Hans und Andreas.

Within a day or two, I fell into even more of a homebody routine. At breakfast, while watching the latest Eurovision update, I ate the beautiful fruit I’d bought from the bustling Naschmarkt. Springtime in Vienna means that the popular market brims with fresh apricots, cherries and especially amazing strawberries. When I bought the strawberries — which inside were literally all red with no white part — I asked one vendor, “Are these Austrian?”

He looked at me as if I were joking. “Pffffft,” he said. “Of course. They’re from Burgenland. They’re the best strawberries in the world.”

My apartment — between the fashionable Mariahilf neighborhood and the more bohemian Margareten — was only one stop down from the Naschmarkt, so I spent hours there, gawking and tasting. I was particularly drawn to a cramped little shop called Urbanek, which is stuffed from floor to ceiling with wine, meats and cheeses.

One midmorning, I squeezed in among construction workers taking a glass of wine on their break. Another afternoon, I was sardined next to a guy in a sharp blue suit and tan raincoat who works PR for a new museum of Austrian history. “All kinds of people come here,” he told me. “Politicians, celebrities, but also — at 10 a.m. — you can come here and see a table of guys already with three empty bottles of wine.” When I settled up, one of the Urbanek brothers insisted on writing down several ideas for dinner and then walked out with me toward the street to point out where the restaurants were so I didn’t get lost.

I loved the casual food of Vienna: the Wurstel boxes, or sausage stands, where I ate currywurst and bratwurst; the open-faced sandwiches at rival shops Duran and Trzesniewski on the tony Mariahilferstrasse shopping street; the beisl (Viennese bistro), with such classic dishes as wiener schnitzel, goulash, spaetzle and tafelspitz.

And then there’s the wine. Vienna, with 1,700 acres of vineyards inside its city limits, is the only major capital that produces wine. In fact, over half of the city’s land is agricultural, concentrated in the outer districts north and west of the center, particularly Stammersdorf in the 21st district and Mauer in the 23rd district. These cozy neighborhoods were once villages before being subsumed into Vienna proper, and they still keep a village feel.

Hilary Merzbacher-Zahel and Alex Zahel’s family owns a heuriger, or wine tavern, in Vienna called Heuriger Zahel. “A heuriger can be simple, but that’s the goal of the heuriger,” says Alex. (Eugenia Maximova/Anzenberger)

One evening I took a 20-minute tram ride out to Mauer. I knew I was at my stop when I saw an old grape press dating from 1800 next to a small produce market, and a big sign listing which heurigen are open that week. The heuriger, or traditional wine tavern, is central to the Viennese experience.

Heuriger, which means “this year’s wine,” dates to an emperor’s decree in the 18th century that allowed winemakers to open simple restaurants to sell their new wine. Many heurigen, even now, are only open several weeks per year— you know they’re open when the owner hangs evergreen branches outside.

I met my friends Alex Zahel and Hilary Merzbacher-Zahel, toured their family vineyards — which were sandwiched between apartment buildings and suburban dwellings, and which offered amazing views of the city center. “Sometimes when we talk about winemaking in Vienna, people don’t believe how close to the city we are,” Alex said. “Ninety percent of the people visit think, ‘Okay, so you bring the grapes in from elsewhere and press them in Vienna?’ But no. The vineyards are right here.”

For our Mauer heuriger crawl, we began at the Zahelheuriger, seated at the Stammtisch, or regular’s table, dining on Austrian classics and drinking Zahel’s excellent Gemischter Satz, a blend of local grapes like Riesling and grüner veltliner, as well as extremely obscure ones like rotgipfler, zierfandler and neuburger. “A heuriger can be simple, but that’s the goal of the heuriger,” Alex said. “The Viennese mayor comes and shares a few glasses of wine at the same table as everyone else.”

Afterward, we walk over to his neighbor, Heuriger Lentz, where we met Reinhard Lentz. “In the past, we were only allowed to sell six dishes!” Lentz said. “ Now, people don’t even want to look at a menu. They know what they want.”

“Vienna is a small city. Mauer is a small village. You go to the heuriger to exchange stories,” Alex said. Reinhard, he added, is the village gossip. “Reinhard always knows everything. We had a small kitchen fire at our heuriger a little while back. It was minor. But before the fire department had even left, Reinhard was there, asking the firemen what was going on. He’s the original citizen journalist!”

At our last stop, Weinbau Stadlmann, we met a woman in her late 50s named Frederika, who was a little tipsy on zweigelt rosé and truly shocked that a stranger — someone not from Mauer, let alone from the United States — had stepped foot in her heuriger. She introduced herself to me and said, “It’s an honor.”

“No, no,” I demurred. “It’s an honor for me.”

“Yes!” Frederika shouted. “It’s not every day you meet a new person in a heuriger! When you don’t live in a multicultural city, you can’t wait to meet other humans!

“Without my heuriger, I cannot live,” Frederika said. “Not because of the wine, but because of the human beings I meet here. This is my living room. We make no dates. We just know that our friends and neighbors come to this heuriger. The owner has a heart like a deep diamond mine. He listens to my problems and I listen to his. This is our life! This is our life stream!”

There’s a word in German for this cozy friendliness, good cheer, smiling warmth and sense of belonging: gemütlichkeit. The ability to deliver this feeling, over a goulash, a schnitzel and a glass of Gemischter Satz is perhaps Vienna’s greatest virtue.

I even found this gemütlichkeit near my apartment one evening when I went to look for a recommended beisl. As I wandered a few blocks up busy Gumpendorfer Strasse looking for it, I came upon a lovely little park, at Loquaiplatz, where an art gallery was having an opening. Here was a crowd of my neighbors, spilling into the park. Some older ladies inside were pouring grüner veltliner and waved me inside to look at local art and to eat cake. When I finally found it, all specials on the chalkboard centered on asparagus. May in Vienna means serious asparagus season. I’d seen rows and rows of white and green spargl in the Naschmarkt, and so I ordered a white and green asparagus soup along with my schnitzel. That night in the bustling beisl, dining alone and making small talk with the server, I was very happy.

But something nagged at me: Could I truly imagine myself living here? It’s safe and clean and efficient and cozy and lovely. But truth be told, I’ve also greatly enjoyed many edgy cities that are chaotic and crazy and politically unstable and potentially violent and insanely alive.

After dinner, I went off in search of Vienna’s edge. All week long, I’d been noticing that there seems to be a sex club in every neighborhood, including one adjacent to my apartment building. Wandering late at night near Mariahilf, I passed another sex club and thought — since they’re so ubiquitous and since there really isn’t much else to do — maybe I should pop my head into this one. When I rang the buzzer, I was greeted at the door by a stern, middle-aged blond woman who told me I was too late for the hot buffet but it would still be 60 euro to enter. Inside, it was quiet except for some old-time disco music. I passed.

Finally, at a mellow neighborhood pub, I drank wine with a guy named Wolfgang, a retired tour bus driver who clearly had been enjoying a few glasses before I arrived.

I asked for Wolfgang’s take on Vienna as the most livable city, but instead he launched into a long, loud, tipsy saga of his own travels in the United States back in the 1980s. Wolfgang fondly recalled Seattle, San Francisco and Los Angeles, partying poolside and on penthouse decks and riding in convertibles. As he held forth, Wolfgang told me that the highlight had been Hawaii, lying on the beach at Waikiki and “swimming in Tom Selleck’s pool.”

“I love America!” Wolfgang said. “I love Americans. They’re so nice! People in Austria say, ‘Ah, Americans are so bad.’ But I say, ‘Have you ever met an American? Have you been there?’ I have. And it was the best two months of my life.”

I soon finished my drink, bid Wolfgang adieu and went home through the quiet streets.

The flea market at Vienna's Naschmarkt is an institution. About 400 sellers present their goods here every Saturday. Seen here are two portraits of famed psychoanalyst Sigmund Feud, who lived in Vienna for 78 years. (Eugenia Maximova/Anzenberger)

Okay, so maybe Vienna was not the most high-energy city ever. Maybe its nightlife is even a little ... teensy bit ... boring. This may not even be a criticism. After all, Vienna is supposed to be the most livable city, not the most exciting. Would I want to live in an edgy, lively but dysfunctional city? What exactly does livable mean, anyway?

To answer that question, I figured I ought to see what it’s like to have a job here. The thought crossed my mind the next day while I was eating lunch in the cafeteria of the Akademietheater, which is attached to Vienna’s famed Konzerthaus, completed in 1913. I’d been spending the past few days eating lunch in the city’s wonderful state-run cafeterias, built to inexpensively feed the city’s hungry workers and students. The day before I’d eaten in the cafeteria of the Academy of Fine Arts, alongside hipster art students and their bearded and tweeded professors. Now, at the Akademietheater, I enjoyed my asparagus soup next to stagehands, technicians and actors, who were intermittently called back to the stage via a lighted sign in the cafeteria. It was a great feeling to be rubbing shoulders with other creative workers. So after lunch, inspired, I walked down the street, behind the Vienna Museum and into the offices of Vice magazine to meet with an editor. I met Markus Lust, the 33-year-old editor of Vice Alps (the Austrian and Swiss edition). I generally equate Vice with edginess, griminess and swagger, so I was surprised by how stately and clean the building was. Lust — stylish in cool glasses and dark jeans, and with mustache and soul patch — led me to a conference room.

I asked Lust what it’s like to run an edgy magazine in a city like Vienna. “It’s challenging,” he said. “We have to look harder for things to cover because people are privileged and laid-back.” The magazine tried doing a documentary on the “squatting scene,” but it was almost impossible to find squatters. “There was, like, one place with squatters. But it turned out that they really were kind of like renters or tenants.”

I called on Lust because the prior spring he’d written a controversial article in response to Vienna’s annual ranking as the world’s most livable city. In fact, Lust declared Vienna “the most miserable city in the world,” in typical Vice edginess. “It’s a little cheeky to call it the worst city in the world,” Lust said, with a grin. “But there’s a certain truth to it. The Mercer study doesn’t take into account the people who actually live here.”

Lust’s article received a lot of blowback from the Viennese, many suggesting that he leave if he didn’t like it.

What’s so “miserable” about Vienna? I asked.

Lust’s list included the city’s large aging population, its bureaucracy, rude bicyclists and shops that close too early. “We’re not open on Sundays,” Lust said. “That’s something we took from the 19th century.” Also, he bemoaned a lack of decent sandwiches (by which I guess he meant sandwiches with two slices of bread, since the Viennese open-faced variety with one slice of bread seemed exceptional to me).

I suggested that these seemed like relatively small things. What about the larger issues? Like, say, crime and safety? “Yeah,” he said. “As far as homicides go, it’s like not even a statistic. Like one or two a year.”

More than anything else, it seemed as though Lust was reacting to something more intangible about the Viennese character. “People here, they are grumpy,” he said, explaining that this grumpiness, grantig, is a venerable Viennese state of being. “People are always complaining. People are hating everything and mumbling to themselves.”

Lust also hated the passive, indirect nature of Austrian German, compared to the German spoken in Germany or Switzerland. “People in Vienna will say, ‘Is this butter still in use?’ instead of just asking, ‘May I have some butter, please?’ ”

But perhaps Lust’s greatest displeasure was with the surging right-wing, anti-immigrant Freedom Party, which has latched on to quality-of-life surveys such as Mercer’s as a reason for keeping out refugees like those coming from Syria. “When people hear Turkish or Arabic on the subway, there’s always some old woman saying, ‘Why can’t they speak German?’ ”

Lust is not the first to express exasperation with his fellow Viennese. Freud himself declared, “Vienna oppresses me.” Yet the good doctor lived here for 78 years, leaving only at the last possible moment to flee the Nazis in 1938. During his exile in London, Freud admitted his freedom was “mixed with mourning, for one had still very much loved the prison from which one has been released.”

In the end, Lust admitted that he actually loved living in Vienna very much: “The problems are all First World problems. We are fortunate to live here. But it’s a little boring.” After we finished our chat, I realized that since I don’t speak or write German, I would not be freelancing for Vice Alps. But maybe that was just as well.

At the Café Sperl over coffee and rhubarb strudel, I found myself thinking about the writer, pop philosopher and self-help guru Alain de Botton. In an essay about his beloved Zurich (second place in the Mercer survey), de Botton wrote that the city’s “distinctive lesson to the world lies in its ability to remind us of how truly imaginative and humane it can be to ask of a city that it be nothing other than boring and bourgeois.”

I think even Trotsky, at least in 1913, over a coffee with whipped cream, might have agreed with that.

Vienna is often cited as the world's most livable city. (Eugenia Maximova/Anzenberger)
If You Go

The central, bustling Naschmarkt is Vienna’s foodie paradise, with more than 100 stalls offering beautiful fruits and vegetables, cheeses, spices, amazing pastries, and lots of tiny bars and cafes surrounding it. / Idle away an afternoon in one of Vienna’s grand old coffeehouses, such as Café Sperl, Café Central or Café Prückel. Enjoy a strudel or a goulash, or just order a coffee and spend all day reading a newspaper, playing cards or daydreaming. / See Vienna’s “wine country,” with more than 1,700 acres of vineyards within the city limits, and visit a cozy heuriger, or classic Viennese wine tavern, full of locals enjoying wine poured by local winemakers.

Jason Wilson is the series editor of “The Best American Travel Writing .” His Kindle Single, “Spaghetti on the Wall ,” was published in February by Amazon Digital Services. He is currently at work on a book about his travels in Austria’s wine country. To comment on this story, email wpmagazine@washpost.com or visit washingtonpost.com/magazine.

E-mail us at wpmagazine@washpost.com.

For more articles, as well as features such as Date Lab, Gene Weingarten and more, visit The Washington Post Magazine.

Follow the Magazine on Twitter.

Like us on Facebook.