Cov txheej txheem:

Arduino Auto Formatting Listings: 3 Kauj Ruam
Arduino Auto Formatting Listings: 3 Kauj Ruam

Video: Arduino Auto Formatting Listings: 3 Kauj Ruam

Video: Arduino Auto Formatting Listings: 3 Kauj Ruam
Video: МАСТЕР-КЛАСС по Arduino | Полный семинар по программированию за 90 минут! 2024, Kaum ib hlis
Anonim
Arduino Auto Formatting Listings
Arduino Auto Formatting Listings
Arduino Auto Formatting Listings
Arduino Auto Formatting Listings

Txoj hauv kev tsis raug uas Arduino qhov chaw ua haujlwm ib puag ncig cuam tshuam rau kev zawm hniav (nkhaus nkhaus) tau ua rau kuv ntxhov siab ntau xyoo (saib thawj daim duab).

Kuv ntau dua qhov kev zawm hniav kom cais tawm mus rau lawv tus kheej kab (saib daim duab thib ob). Kuv pom qhov no yooj yim dua rau de-kab. Kuv sau nws hu ua 'Allman' style.

Thaum kho koj cov duab kos, nias CTRL+T yuav rov ua dua txhua txoj haujlwm zoo nkauj, tab sis (los ntawm lub neej ntawd) rau cov qauv uas kuv tsis nyiam.

Nws yog qhov yooj yim los kho tus txheej txheem pib ua lub neej ua haujlwm (tsis yog rau kev zawm hniav, tab sis rau ntau yam kev xaiv).

Cov txheej txheem yog txhawm rau nrhiav cov ntaub ntawv hu ua 'formatter.conf', luam nws rau koj cov ntaub ntawv nyiam hauv ib cheeb tsam thiab ua ib kab ntxiv.

Kauj ruam 1: Ua Qhov Hloov

Ua Qhov Hloov
Ua Qhov Hloov

Nrhiav tus 'formatter.conf' hauv lub ntsiab Arduino installation nplaub tshev.

Kuv nyob hauv daim nplaub tshev hu ua C:/Program Files (x86)/Arduino/lib/

Luam cov ntawv (CTRL+C) thiab muab tso rau hauv koj tus kheej nyiam cov ntawv tais ceev tseg.

Txhawm rau nrhiav cov ntawv no, ob npaug nias ib qho ntawm koj cov duab kos thiab tom qab ntawd mus rau Cov Ntaub Ntawv> Nyiam thiab koj yuav pom lub qhov rai zoo ib yam li uas tau qhia ntawm no.

Muab cov ntaub ntawv 'formatter.conf' tso rau hauv koj tus kheej nyiam (CTRL+V). (Nws yuav nyob nrog koj tus kheej 'nyiam.txt' cov ntawv).

Kauj Ruam 2: Hloov pauv mus rau Qhov Nyiam

Ua qhov hloov pauv mus rau qhov nyiam ua
Ua qhov hloov pauv mus rau qhov nyiam ua

Koj yuav tsum tau kaw koj ib puag ncig Arduino ua ntej ua qhov hloov pauv hauv qab no rau cov ntawv no?

Yog tias koj ob npaug nyem rau ntawm koj cov ntawv theej tshiab 'formatter.conf', koj yuav tsum qhia koj lub khoos phis tawj qhib nws hauv Notepad lossis zoo sib xws.

Thaum kawg ntxiv kab

style = allman

rau hauv 'formatter.conf' file. Kuv tsis xav tias txoj haujlwm tseem ceeb heev ??

Kuv ntxiv cov lus hais saum toj no.

(Tsiv cov ntawv 'formatter.conf' rau hauv koj tus kheej cov ntawv nyiam, txhais tau tias qhov kev hloov pauv yuav 'lo' txawm tias koj hloov kho koj li kev teeb tsa Arduino).

Kauj Ruam 3: Ua Lwm Yam Kev Hloov

Ua Lwm Yam Kev Hloov
Ua Lwm Yam Kev Hloov

Kuv ntseeg tias ntau qhov kev xaiv tsis raug tuaj yeem hloov pauv los ntawm kev ntxiv cov kab zoo sib xws.

Cov txheej txheem nyob ntawm no:

Pom zoo: